Questions tagged [external-api]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
101
votes
7answers
34k 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
26k 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 ...
9
votes
3answers
6k 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....
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 ...
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
715 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
255 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
4k 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
422 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
327 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
201 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
916 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
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 ...
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
554 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
7k 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
423 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
104 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
442 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
1answer
155 views

How to Collect Uniswaps Token-pair FULL Price history? ( Help )

How do websites like CoinGecko.com and Dextools.io get a token pair's FULL price history? I understand that I can query Uniswap's theGraph, but that limits only 1000 entries. How do these websites ...
2
votes
0answers
562 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
350 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
72 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
462 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
232 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
163 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
750 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
324 views

Geth light node returns 0 pending / queued transactions despite being fully synced. Cannot reasonably access tx-pool data

The two following commands are inputted into the Javascript live console, but return identical results from HTTP requests (whose methods appear slightly different). The node is fully synced as ...
1
vote
2answers
668 views

I am trying to use chainlink using remix and i followed the chainlink docs

I am facing this issue,What to do now? My Code pragma solidity ^0.6.7; import "https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/interfaces/AggregatorV3Interface....
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
375 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
32 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
42 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
298 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
1answer
68 views

TRANSFORM ERC 20 vs Sell to pancake swap

I am able to do the Sell to pancake swap tranx But failed with the API when i do TRANSFORM E R C20 Tranx example of failed: https://bscscan.com/tx/...
1
vote
1answer
58 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
40 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
248 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
83 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
266 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 ...