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 ...
  • 2,482
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",...
  • 3,288
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 ...
  • 2,482
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
  • 194
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'...
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 ...
  • 4,479
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 ...
  • 2,482
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 ...
  • 4,479
6 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 ...
  • 1,969
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.
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, ...
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 ...
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 ...
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 ...
  • 3,392
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 ...
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 ...
  • 2,378
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 ...
3 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 ...
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=...
  • 3,392
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 ...
3 votes
Accepted

Get Delegation Amount from tezos api

In a previous question you were given a link to TzKT indexer API. This API will likely offer the vast majority of things you need. Please make sure you read/research their documentation, as it is very ...
3 votes

How can I get all the transaction from a nft collection?

You can use the TzKT api for this, check it out at https://api.tzkt.io/ As a rough sample you could use something like this: https://api.tzkt.io/v1/accounts/KT1CzVSa18hndYupV9NcXy3Qj7p8YFDZKVQv/...
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
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"></...
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 ...
  • 4,479
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":[...],"...
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
2 votes

Understanding how @Taquito/Beacon works

Taquito is a library for building dApps and wallets from ECAD. Beacon is a library to communicate from a dApp to a wallet from AirGap If you look at the source code for @taquito/beacon-wallet here: ...
2 votes

How can I get all the transaction from a nft collection?

I'd recommend you TzKT API: api.tzkt.io, because it's more flexible and has richer functionality. I don't know, how exactly you are going to "study the proportion of fake trades", but in ...
  • 2,482
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

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