Questions tagged [external-api]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
98
votes
7answers
33k 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
15k 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 ...
14
votes
5answers
11k 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. ...
11
votes
4answers
25k 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 ...
8
votes
2answers
4k views

Why are there two methods encoding arguments? "abi.encode" and "abi.encodePacked"

When we call a function on an external contract, the EVM computes a bytes buffer which contains the function signature and arguments. There are two ways to serialize arguments: abi.encode abi....
7
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 ...
6
votes
1answer
711 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
241 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?
4
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 ...
4
votes
3answers
3k 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
421 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
1answer
2k 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.
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
6k 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
319 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
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
18k 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
897 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
4k 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
40 views

Any other provider instead of Oraclize

Are there any other providers for calling external APIs in Solidity other than Oraclize?
2
votes
1answer
492 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
6k 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
415 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
64 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
381 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
371 views

Web3 - Buy token by code

i'm trying to buy $TRY token with my code. It's BSC token. The problem is when i send money to the contract i don't receive any token :/ The contract i'm trying to buy : https://bscscan.com/token/...
2
votes
0answers
300 views

Get all transfers of a token contract from etherscan API with python

I am trying to pull out from etherscan api all token transfer from a particular token contract. Currently, I can pull data by manually going to etherscan token contract page - for ex cvc coin: https://...
2
votes
0answers
68 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
2answers
424 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
223 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
160 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
662 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
365 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
21 views

Make external adapter call only accessible through smart contract

sorry if this is a newbie question, I'm new to solidity and smart contracts. I want to make an API call on my smart contract but from what I saw, I have to implement a Chainlink external adapter. Now, ...
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
291 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
4k 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
30 views

Chainlink "Any API" Returning 0

I want to use the chainlink API features but I can not get the data. When I try to execute requestEthereumPrice function I get "uint256: 0" I am using Kovan test net and metamask. pragma ...
1
vote
1answer
36 views

Wallet as authenticator with WalletConnect

I want to use the wallet in my web app as authenticator for an API access, e.g. by signing an arbitrary string and then check the signature at the API side. I know there are sign() methods to do so. ...
1
vote
1answer
177 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
64 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
212 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
596 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
75 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
1k 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
300 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 ...