Questions tagged [external-api]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
14 views

Price feed of multiple coins in a single GET request

I have used Chainlink oracle to get the price feed of a single coin. But I want to fetch the latest price of 100s of coins from the smart contract using oracle. Is it possible to get the price of ...
2
votes
1answer
22 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 ...
0
votes
2answers
27 views

Smart Contracts and API Calls: How to check API repeatedly without paying a fee?

I'm new to this entire space, so please bear with me. I'm trying to create a betting app. I want people to sign the contract and say they'll put up some money that they'll either win or lose depending ...
1
vote
0answers
82 views

How to pull data from DeFi Liquidity Pools

I am relatively new to decentralised development, and apologies in advance if a bit of a dumb question. I am doing a project where I am looking to download the following data. I am trying to figure ...
0
votes
0answers
11 views

How I can check request status with provable.xyz?

Simple question but I failed to find the answer. Before Oraclize became provable, there was an api endpoint for checking the status of a specific request id. This for example helped to determine if an ...
0
votes
0answers
65 views

how to get the full list of block reward for the last 24 hours? Either via an API/JSON or Google BigQuery

I have spend a couple of days now trying to find a good source for the block rewards that will allow me to calculate block rewards and averages for the last 24h and since UTC0. (I am aware of being ...
1
vote
0answers
22 views

scope of references to external smart contract, global variables, eleminiate redundant code

Imagine that there's a smart contract deployed which contains a number of sub-contracts like so: pragma solidity ^0.5.0; contract A { address contract = 0x6663130dDfF21E3BC963Ee902005223b9A202106; ...
0
votes
0answers
17 views

Using etherscan to track the status of incomming transactions, free version?

I plan to start to accept Ethereum and some tokens based on it, on a website. The volume would be, I think, at most 10-50 payments a day, at most. And I want to allow a user to know the status of a ...
0
votes
2answers
81 views

Etherscan API Get Balance - Decimals Not Showing In Response

Expected Use the Etherscan API to make a GET request for an ETH address' balance in order to receive a response providing the Ether token quantity representing all decimal places. Observed The ...
0
votes
1answer
31 views

Dumping erc20 token transactions via rpc?

I'd like to do dump all transactions of an erc20-token via the json-rpc interface. I've got a full node running but I'm lost, since the ethereum blockchain is harder to navigate than bitcoin for some ...
1
vote
1answer
28 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 ...
0
votes
0answers
12 views

Why is serprent considered untrusted?

Serpent was way to fetch Diesel prices from the oraclize api at fixed intervals. On GitHub, it s written audits proved the code to be flawed, but where are such audits? I m meaning why is it flawed?
1
vote
0answers
118 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://...
0
votes
0answers
63 views

Solidity external call with bytes4 / keccak256

I want to call a Contract1's function from Contract2. I know the way i've tried is deprecated, but i want to understand. This is why i've set a very old solidity version with the pragma directive. I ...
1
vote
1answer
169 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....
0
votes
1answer
96 views

Estimate Solidity function gas cost

When i deploy a smartcontract with remix, i can call functions in order to test it. I do not really know if this is remix or metamask which is doing this job: Before validating the transaction, i have ...
0
votes
0answers
14 views

try catch syntax in solidity [duplicate]

I have read that "try catch" structure in solidity is dedicated to external calls. Are there other reasons we should work with "try catch" structure ? Here is what i've tried in a ...
0
votes
2answers
41 views

remote contract function call with solidity

I've deployed this very simple Contract: contract Contract1 { function myfunction(uint param1) public returns (uint) { return param1+1; } } Now, I've deployed a second contract: ...
1
vote
1answer
30 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 = ...
0
votes
1answer
16 views

Is it possible to run a program/function written in different language from solidity? [closed]

I have a script written in a different language to get executed and verified by miners of the network. Is there a way to call this script from solidity smart contract?
1
vote
0answers
1k 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?
0
votes
1answer
15 views

Add param to API POST request [closed]

I need to query this endpoint '''https://******com/api/payments/{payment_id}/refund''' Because it is a post request, I assume that the payment_id param needs to be in the body of the request. How do I ...
1
vote
1answer
101 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
679 views

Perform an automated transaction using 1inch API

To perform an automated 1 inch transaction I use these two functions. It works well at first. Unfortunately, in the last few days I have always had the same errors: Fail with error 'Return amount is ...
0
votes
1answer
40 views

How to calculate the right amount of a token to use in 0x quote endpoint

I'm trying to use 0x to buy tokens with ETH. I'm following the sample at https://0x.org/docs/guides/swap-tokens-with-0x-api#swap-eth-for-1-dai. I got the token address, and the decimals. let's say ...
0
votes
0answers
28 views

Is first call to oraclize query free in mainnet, as in testnet?

We were trying to include oraclize query to get price feed in one our contracts, as of now we have observed that the first oraclize is free in kovan. Does same applies for mainnet or else we has to ...
1
vote
0answers
35 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
1answer
368 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 ...
2
votes
0answers
58 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?
6
votes
1answer
196 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?
0
votes
0answers
35 views

Free API To Get Ethereum Price [duplicate]

I am looking for a free api to get ETHEREUM CRYPTO CURRENCY PRICE. Entire yesterday i was searching google & test many web sites. But result was zero for ethereum price. Here is what i tried : 1. ...
0
votes
1answer
1k views

What is the best free api for ETHEREUM price [closed]

I use the api below for bitcoin price : https://api.coindesk.com/v1/bpi/currentprice.json But coindesk hasn't ETHEREUM price in it's api. What api should i use to get ETHEREUM price? Also the api ...
0
votes
1answer
671 views

Etherscan api: how to get transaction fee?

For example: open this https://etherscan.io/tx/0xcb1e3530950cf2c43a307bcb5645ae71a12c76a60831617badd04aea3efe68aa It's a random one I see these infos on webpage: Gas Limit: 136,500 Gas Used by ...
0
votes
1answer
205 views

Which is the best way to interact between smart contracts for complex scenarios (solidity 0.6)?

I'm learning about Solidity. I would like to write a complex scenario of demo to test the power of Solidity and smart contracts. My doubts are about interaction between smart contracts. If there ...
0
votes
1answer
215 views

Download Etherscan input data via API

I am unable to find the correct API call format to download the input data field from the event log of each transaction - is there a way to use API key to download this information? I am referring ...
2
votes
1answer
178 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.
1
vote
2answers
472 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 ...
0
votes
1answer
57 views

DDEX Api Question for Python… Signing ETH Transactions?

Having an issue with signing a message for the DDEX api... I'm trying to do it in python, and for some reason my signature is off by two characters. Here's my code using the private key and UTC ...
0
votes
1answer
72 views

Any QuickBlocks tutorial?

From my understanding QuickBlocks is an api in C++ that provides similar services as etherscan API for the ethereum blockchain. Is there a link or tutorial to use quickkblocks because the example in ...
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 { ...
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
330 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 ...
0
votes
1answer
184 views

How to get the timestamp from the latest event on the etherscan.io apis

How to get the timestamp from the latest event on a contract using the etherscan.io api ? I'm using the getLogs call this way: https://api.etherscan.io/api?module=logs&action=getLogs&...
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
60 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 ...
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.
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?
0
votes
2answers
312 views

How to access ethereum smart contract functions from server side api calls using ExpressJS?

I have the abi and bytecode of contract functions. Is there a way to access them using api calls only(using web3 module or any other) since i want to integrate them in an android native app and thus ...
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?
0
votes
1answer
231 views

Updated: How to interact “directly” with smart contract via a micro-controller?

Assume we have a micro-controller and it collects a meta-data (ex. a payload as a string). How this micro-controller can interact "directly" with smart contract to write this data to the blockchain? ...