Questions tagged [external-api]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
96
votes
7answers
32k 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?
59
votes
3answers
14k 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 ...
12
votes
5answers
10k 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
24k 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
694 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
204 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
8k 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
419 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
4k views

Is there any websocket ethereum provider?

Is there any websocket ethereum provider? Except etherscan one. Maybe there are paid wss subscriptions?
3
votes
2answers
3k 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
310 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
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
16k 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
810 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
3k views

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

How to use infura API with web3 js? Where should I put secret key?
2
votes
1answer
39 views

Any other provider instead of Oraclize

Are there any other providers for calling external APIs in Solidity other than Oraclize?
2
votes
1answer
365 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 ...
2
votes
3answers
4k views

Get all TOKEN transactions by address

Given the address of a token, how I can get all the transactions related to that address using JSON RPC or an external api such a api.etherscan.io? The transactions that gives a Ethereum address are ...
2
votes
1answer
406 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
25 views

how to fetch net worth of a given address?

Take this whale wallet for example: https://etherscan.io/tokenholdings?a=0xa929022c9107643515f5c777ce9a910f0d1e490c If you look at the top right, it says Value in USD. Is there any any API that can ...
2
votes
1answer
195 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
62 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
304 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
193 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
159 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
499 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
3k 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
2answers
336 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
41 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
282 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
3k 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
40 views

Read Solidity smart contract private field

Let's suppose this smartcontract: contract Test1 { string private i_am_private; string public i_am_public; ... } Solidity's compiler is automatically generating a getter function for public ...
1
vote
1answer
317 views

Why is there 2 methods abi.encode and abi.encodePacked for argument encoding

When we call a function on an external contract, the evm computes a bytes buffer which contains the function signature and arguments. There are 2 ways to serialize arguments: abi.encode and abi....
1
vote
1answer
32 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
122 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
400 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
64 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
875 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
277 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
232 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
1answer
1k views

Read info from block chain from within a contract

Is it possible to read the block chain from within a contract? Specifically, I want to know if I can see how much ether user A has spent during the last 50 or so blocks. I didn't find anything in the ...
1
vote
2answers
1k 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
231 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","{"...