Questions tagged [external-api]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
94
votes
7answers
30k views

How can an Ethereum contract get data from a website?

What is the process/workflow behind the process where an Ethereum contract gets some data from a website?
54
votes
3answers
13k views

Why can't contracts make API calls?

The model that contracts can only accept and process data, instead of also being able to retrieve data from the Internet, seems limiting (even if not, it's less direct). If a concern is that data or ...
11
votes
5answers
9k views

REST-Like API for Ethereum

I'm researching REST-Like API services for Ethereum in order to use it on our service. However, there are only a few services I could find. I'd very grateful if you could share the other services. ...
10
votes
4answers
19k views

Is there API to create Ether wallet?

I know how to create wallet manually, however I would not like to take my clients out of website (I doubt anyone would) and would rather do their wallet creation behind the scenes when they register ...
8
votes
1answer
2k views

Why does this Oraclize query only works once?

Why this code works one time? First time I get proper random number, but after that I get wallet response "Data can't be executed, so it will use all provided gas" I'm in Testnet. contract ...
6
votes
1answer
684 views

Can you do a POST to an external webform using a Ethereum smart contract?

Can you do POST or submit a form from an external site using a smart contract? And how can this be done? Are there any examples of live code out there?
6
votes
1answer
136 views

Why do I need decentralized oracles?

I've been reading a lot about how smart contracts work, and I'm a little new to the area, but why do we need decentralized oracles? It feels like I can just make an API call from wherever and it's OK?
5
votes
1answer
7k views

Obtain token transfer data from an address

I would like to obtain token transfer data from an address via Rest API For example, take this address: https://etherscan.io/address/0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98#tokentxns (Etherscan ...
4
votes
1answer
417 views

Live demo of parsing data from external API's like twitter into an Ethereum smart contract

I'm looking to make a simple ethereum smart contract to just monitor a twitter weather feed for the word "sunny". And if its sunny, it would send coins to some account I specify. Are there any live ...
4
votes
2answers
2k views

Get Balance History of address

In building an IONIC app, I am attempting to retrieve the historical balance of a single Ethereum address. I am currently not sure how far back I will need to go. I know that Etherscan.IO offers a web ...
4
votes
1answer
3k views

web3js sender account not recognized

Under Ganache, I created some APIs with nodejs to managing a Smart Contract. One API is for the creation of new accounts with newAccount = web3.eth.accounts.create(web3.utils.randomHex(32)); Then, ...
4
votes
1answer
2k views

Why does etherscan.io API response with wrong balance?

Let's take the following company. The current ETH Balance is 268,691.327038426 Ether: But API response 268698327038426745609145: As you can see API response does't contain floating point so the ...
4
votes
7answers
3k views

Is there any websocket ethereum provider?

Is there any websocket ethereum provider? Except etherscan one. Maybe there are paid wss subscriptions?
3
votes
1answer
233 views

API to enumerate the blocks from a specific day

I'm trying to find an API that lists all the blocks from a specific day, as we can do with bitcoin: https://blockchain.info/pt/blocks/1515628800000?format=json I've searched etherscan.io and ...
3
votes
2answers
2k views

Can I get an ERC20 balance n blocks back in time?

By calling a running Ethereum node through the getBalance API, you can get the Ethereum balance N blocks back as explained here. This is useful if you would only like to trust a balance which has been ...
3
votes
1answer
1k views

Is there a complete list of available values for the `--rpcapi` command line option of geth?

I known this page https://github.com/ethereum/wiki/wiki/JSON-RPC, but seems it doesn't contains all available apis, for example, it doesn't contain personal API.
3
votes
1answer
198 views

What is the intended way for Ethereum contracts to interact with third party software? [duplicate]

Let us assume we have an Ethereum contract to issue software licenses. The contract creates an entry in it's local database to document the availability of the license to the purchaser. In which way ...
2
votes
3answers
8k views

Getting ETH price with ethplorer API

Simple question: It seems like ethplorer doesn't expose the ETH price via their public api: https://github.com/EverexIO/Ethplorer/wiki/Ethplorer-API Am I missing anything, or do I have to rely on ...
2
votes
3answers
718 views

ERP systems and Ethereum

I wanted to know the integration state of ERP system (like SAP) and Ethereum. Is there an API that allow a smart contract to fetch information from a ERP to store that data? Thanks in advance Best!
2
votes
1answer
37 views

Any other provider instead of Oraclize

Are there any other providers for calling external APIs in Solidity other than Oraclize?
2
votes
1answer
400 views

How to encrypt an API key if using oracalize for some API in a smart contract?

In my smart contract, I want to use the random.org API to generate a random number, but when publishing the verified source code I don't want anyone to see what API key I'm using. The etheroll ...
2
votes
1answer
80 views

How can I query an API to get my erc20 token balance of an address in JSON format?

Is there an api where I can query if an address contains an erc20 token? I need it returned in JSON format.
2
votes
0answers
40 views

How does chainlink solve the oracle problem? [closed]

I've heard a lot about Chainlink recently -- how Synthetix, Aave and other top Defipulse projects are using them. How exactly does Chainlink solve the oracle problem from a technical perspective?
2
votes
1answer
159 views

Call a view function of an Ethereum Smart Contract using a program written in C

my attempt is to call a view function to reatrieve some data from a contract on the Blockchain using a C program. I do have the interface of the contract. I think i need to performe two things in ...
2
votes
1answer
164 views

Transaction api question for using remote Node such as infura

I want to have a function to send eth to another address by php program, and I do not want to run a local node on my server. Can I use infura as the web3 provider and use the API to send eth to ...
2
votes
2answers
1k views

Block.io ETH alternative

What's a good Ethereum alternative to block.io? By good I mean, trusted and production ready.
2
votes
0answers
157 views

Using External API in a Contract? [duplicate]

Is it possible (and feasible) to have a solidity contract connect to an external api and execute a contract based on what is found? For example betting on sports games by agreeing to a credible API ...
1
vote
2answers
292 views

How to post to the blockchain without a third party API like infura

I have been using web3 nodejs and infura.io to build apps that interact w/ the Ethereum Blockchain and it is all great but I don't like the idea of a failure point my my apps because they rely on a ...
1
vote
1answer
2k views

etherscan request API limit [closed]

i want to know the limit request on etherscan API with API key, and limit if we go on paid service. thanks in advance.
1
vote
1answer
2k views

How to use infura API with web3 js? [duplicate]

How to use infura API with web3 js? Where should I put secret key?
1
vote
2answers
310 views

Erc20 token minting based on api variable

Can I have a erc20 coin contract that watches an API and mints coins and distributes them evenly to the network based on a changing variable in said API?
1
vote
1answer
37 views

What is the difference between an Ethereum client and Ethereum API?

Pardon me if this is silly, but as per my limited observation, the number of APIs is higher than the number of clients that exist. How are APIs different from clients?
1
vote
1answer
260 views

How do you handle a non-deterministic change during smart contract execution?

I read the following E-SO post and also several threads on Ethereum/Solidity forums regarding smart contracts and external servers (anything involving a socket): Why can't contracts make API ...
1
vote
2answers
2k views

Where can I find my pending transactions?

I wanted to know where I can find the current pending transaction for an account which isnt committed. Is it even possible? How can I get transaction hashes for transactions which are pending? Any API ...
1
vote
1answer
10 views

What is “selector” in ChainLink API call?

I am using the example from chainlink to call an API; however, I am not sure it does. function checkProof(string memory JobLocation, int job_id) public { Chainlink.Request memory req = ...
1
vote
1answer
27 views

Chainlink node not connecting to External Adapter

I'm trying to use the Chainlink External Adapter to connect my contract to Twitter but my node I'm running is seemingly not able to connect to the adapter at localhost:8080 even though the adapter ...
1
vote
1answer
102 views

Getting stock market data from API or other means?

I'm trying to make a contract that interacts with a market price or a market out come : e.g APPL drops below X or NFLX > Y ... Is it possible in Solidity to call an external API during this ...
1
vote
2answers
58 views

Set the price by calling another contract and getting result from it

I want to set the price in Token every time the contract is deployed by calling ETHUSD in constructor and getting result from it. pragma solidity ^0.5.0; import "./ETHUSD.sol"; contract Token { ...
1
vote
1answer
228 views

Etherscan API no decimals separator

I am using Etherscan API to retrieve certain erc20 token balance on given ETH address and get a number like 62910000000 without decimals separator. In fact the proper balance is 6291000.0000. How to ...
1
vote
1answer
761 views

How to make API calls from a .NET Application to an Ethereum Private Network

I'm starting on blockchain development and I have a question: I was wondering if it is possible to make RPC calls to a private ethereum network (handling user private keys is not a problem in our ...
1
vote
1answer
235 views

How to integrate Ethereum with MATLAB?

As the computation on Ethereum is expansive, I want do some matrix calculation off-chain. However, it is confused that how to transmit data between Ethereum and other software (like MATLAB)?. Is there ...
1
vote
2answers
143 views

Can I download all transactions into EOS ICO as a excel file?

I would like to download all transactions into EOS ICO as an excel file. I know etherscan provides this service but it only allows me to download 2000 transactions. But the transactions into EOS crowd ...
1
vote
2answers
960 views

Should an API call be in the Solidity backend or the Javascript frontend?

I am fairly new to blockchain development. I want to call a function in my contract when a condition in the API is true. Should I make this API call in my contract, or in my frontend?
1
vote
1answer
1k views

Calling External Web Service from Smart Contract [duplicate]

Trying to find a way to invoke a external web service to perform any operation based on some action on the smart contract. Request to share details as to how to perform the same.
1
vote
1answer
229 views

Why would Oraclize fail when a normal post doesn't?

I'm using the Oraclize test query to confirm my oraclize response is empty. Here's a link to the exact test query, which contains the following: URL ["json(https://mainnet.infura.io/).result","{"...
1
vote
2answers
495 views

Oraclize failing to return data when using example contract

I am trying to use the example Oraclize contracts at https://github.com/oraclize/ethereum-examples/tree/master/solidity, including KrakenPriceTicker.sol. Here's my contract (modified very slightly): ...
1
vote
0answers
48 views

Calculating annual percentage yield (apy) value for Uniswap pairs

I wants to calculate annual percentage yield for a token pair listed on uniswap like this. Is there any API which I can use to retrieve the value? How can it be directly calculated?
1
vote
0answers
29 views

Gettting ERC-20 token transfer count over an API

I am building a service to monitor token activity. Does any service have an API to get the transfer count of a ERC-20 token? I am not interested in individual Transfer events, only their count.
1
vote
0answers
20 views

curl ethereum -d question

How can I change the following to php format? what means the -d @...jaon, it means the parameter for this curl is json and post to the url? cat call.json { "private": "3ca40...", "gas_limit": ...
1
vote
0answers
59 views

How to handle Oraclize if it's failed?

I'm using the Oraclize to get the random number for bets. When the function bet() is called and if the oraclize is failed it should call the pingOracle() again. Below is example function bet() public ...