FastNEAR
FastNEAR allows to easily query the NEAR blockchain to get an account's assets, map keys into account IDs, explore a block's transactions, etc.
Possible use cases include:
- Querying all assets of an account (including fungible and non-fungible tokens)
- Querying the last block produced
- Mapping Public Key to Account ID
- Mapping Full Access Public Key to Account ID
- Knowing a user's staking pools (validators)
- Querying the top holders of a token
Documentation
Click here to see the complete list of endpoints and usage examples
Endpoints​
The FastNEAR Server provides a low-latency endpoint for wallets and explorers.
- Mainnet:
https://api.fastnear.com
- Testnet:
https://test.api.fastnear.com
Examples​
Query last block produced​
curl https://mainnet.neardata.xyz/v0/last_block/final
Response
{
"block": {
"author": "aurora.pool.near",
"header": {
"height": 129311487,
"prev_height": 129311486,
...
}
}
}
Query User's Balance​
# Query user's FTs
curl https://api.fastnear.com/v1/account/root.near/ft
Response
{"account_id":"root.near","tokens":[{"balance":"199462092","contract_id":"pixeltoken.near","last_update_block_height":null},...
# Query user's NFTs
curl https://api.fastnear.com/v1/account/root.near/nft
Response
{"account_id":"root.near","tokens":[{"contract_id":"nft.goodfortunefelines.near","last_update_block_height":null},...
# Query all user's assets
curl https://api.fastnear.com/v1/account/root.near/full
Response
{
"account_id": "root.near",
"tokens": [
{ "balance": "199462092", "contract_id": "the-token.near" },
...
]
}