Hot answers tagged

14 votes
Accepted

How to query rewards of a specific KT1 account?

Unfortunately there is no way to directly query just the delegator's reward from TzScan API. But you can easily use this API call with some extra calculations: //This is what the baker got var ...
user avatar
  • 2,327
12 votes

Total amount of XTZ in existence

TzScan has a service for that, but only for the current value: https://api1.tzscan.io/v1/supply returns { "dls":"76431859801260", "foundation":"76431859801260", "early_bakers":"3156502294100",...
user avatar
  • 3,278
12 votes
Accepted

How do I query the Balance of a KT1 account Cycle by Cycle?

<block_id> - is a hash or a level of the block at which you ask for balance. If you want to get a simple balance at the specific point in the cycle: (this is pseudocode, I hope you figure it ...
user avatar
  • 2,327
8 votes

How do I query the Balance of a KT1 account Cycle by Cycle?

You can use TzScan API for this: /v3/balance_history/KT1..., the documentation is here: balance history doc. For example https://api6.tzscan.io/v3/balance_history/KT1GgUJwMQoFayRYNwamRAYCvHBLzgorLoGo
user avatar
  • 194
7 votes
Accepted

How to retrieve data from smart-contract using javascript?

As of the current Babylon protocol and the upcoming Carthage, the RPC only provides you the ability to retrieve the value for a known key that you provide to the RPC. But even in this scenario you ...
user avatar
  • 1,979
7 votes
Accepted

API Access HTML/Javascript problem

You've encountered a mixed content error. Requests can't be a mixture of http and https, they need to be all of the same, preferably https. Just change the const url = 'http://api6.tzscan.io/v3/supply'...
user avatar
6 votes
Accepted

Total amount of XTZ in existence

The current protocol does not keep track of a tally of all tez on the network. It would be a good idea to do so, as it permits computing proportional reward, it can serve as a canari against money ...
user avatar
  • 4,409
6 votes
Accepted

How do I get a list of all delegators a baker has, using only node local endpoints?

Here the RPC API method: /chains/main/blocks/head/context/delegates/tz1.../delegated_contracts Worth to know: If you are working on baking-related software, you should be careful with the level of ...
user avatar
  • 2,327
6 votes
Accepted

Where is the reward operation for athens?

This happened directly as part of the context "stitching". When a new protocol is activated, an initialization function is called which lets the new protocol performs some housekeeping on the context ...
user avatar
  • 4,409
5 votes
Accepted

How to undelegate your account

You can stop delegating using the following command: tezos-client withdraw delegate from See here for a list of all client commands.
user avatar
5 votes
Accepted

Alternative to TzScan API

I think this will help you find what you're looking for. https://tzstats.com/docs/api/index.html#introduction. I've searched this resource and found numerous endpoints related to delegates, rewards, ...
user avatar
4 votes
Accepted

How do I get a list of the transactions of an address using TzScan API v3?

You can use the operations endpoint, filtering for transactions: https://api1.tzscan.io/v1/operations/$address?type=Transaction Obviously swap address for the address in question. You can retreive ...
user avatar
4 votes

Is it possible to have a transaction operation in any operation's "contents"?

From my understanding, yes and no. There are four groups of operations: Baking - endorsements Voting - proposals and ballots Annonymous - seed_nonce_revelation, double_bake/endorse, activate_account ...
user avatar
4 votes

Find balance of an address/contract at a given block / date

You can use the HTTP-RPC interface on your local node. http://localhost:8732/chains/main/blocks/{BLOCK}/context/contracts/{ADDRESS}/balance On a default node, this is only good for the previous 5 ...
user avatar
  • 3,364
4 votes

How to retrieve data from smart-contract using javascript?

We maintain an index of all historic bigmap data at TzStats. To fetch all current keys and values in a bigmap call https://api.tzstats.com/explorer/bigmap/:id/values If your bigmap is very large you ...
user avatar
4 votes

How do I query wallets for NFT's

NFTs are tokens. When you query token balances from these API's, you are getting a mixture of Fungible and non-Fungible tokens back. Users can have more than 1 of the same NFT, so they also have a ...
user avatar
4 votes
Accepted

What are good ways of simulating transactions in mainnet?

The tezos-client transfer command takes the --dry-run flag that will simulate a transaction instead of injecting it. It will show you any updates of storage and balances that would've been performed ...
user avatar
  • 2,348
3 votes

Timestamps overflow/underflow errors

There are two representations of timestamps in the Tezos protocol: The one defined in Time_repr module: timestamps are 64-bits integers The one defined in Script_timestamp_repr module: timestamps are ...
user avatar
3 votes
Accepted

TzStats: delegators list

https://api.tzstats.com/tables/account?delegate=tz1ADDRESS The full API used for the 'Delegators' tab: curl 'https://api.tzstats.com/tables/account?delegate=tz1ADDRESS&is_funded=1&columns=...
user avatar
  • 3,364
3 votes
Accepted

Issue with API Request Cycle

The first element returned from https://api6.tzscan.io/v3/rolls_history/tz1NortRftucvAkD1J58L32EhSVrQEWJCEnB?number=1 is the data from the latest cycle. HTML <h1>Last Cycle</h1> <div ...
user avatar
2 votes

How do I get a list of all delegators of an address using TzScan API v3?

Thanks to our friend Klassare, who helped me in Riot channel, we've got an answer: https://api3.tzscan.io/v3/delegated_contracts/[account]?p=0&number=50
user avatar
2 votes

'Tezos' wallet addresses generation

I wrote simple html with JS script: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="eztz.min.js"></...
user avatar
2 votes

Calculate total supply of XTZ for a given block

The protocol by itself does not track that number (though it would be useful if it did, for many reasons). This leaves one option, use an indexer that tracks the total supply, and updates it block by ...
user avatar
  • 4,409
2 votes

Is there a node API to determine if a reorg has occurred

There is the "streaming" RPC /monitor/heads/[chain_id] that tells you every time the node changes its head. It returns a stream of JSON objects looking like {"hash":[...],"...
user avatar
2 votes

What is the Content-Type when injecting an operation directly to the node

Seems like it is application/octet-stream - found that just after posting
user avatar
1 vote

Failed to parse the request body: Unhandled error (Failure "Unexpected data (Chain_id)")

Turns out the the chain_id returned from the /chains/main/chain_id looks like this: ""Net...\n"" which the run_operation did not like
user avatar
1 vote

Is there low level documentation about creating transactions available?

There is documentation on serialization here: https://tezos.gitlab.io/api/p2p.html And a usefull implementation from the Airgap Team at: https://github.com/airgap-it/airgap-coin-lib/tree/master/src/...
user avatar
1 vote
Accepted

Cors issue when running docker using babylonnet.sh

The babylonnet.sh script accepts node options. You can inspect the node options via tezos-node run --help. The option you're looking for is: --cors-origin=ORIGIN: CORS origin allowed by the RPC ...
user avatar
1 vote

List of all accounts sorted by balance

You can export a .csv file from the arronax block explorer: https://arronax-beta.cryptonomic.tech/ You can also pull the data directly from the API: https://github.com/Cryptonomic/Conseil
user avatar
  • 434
1 vote

API documentation for tezos.org.sg?

Tezos.ID's APIs should exist already, but are not yet available for public use. See https://tezos.id/roadmap saying that they will be released around the end of July 2019.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible