代币
查询GRC 20 代币的总发行量
返回 GRC-20 代币当前的流通总量
https://gatescan.org/api
?module=stats
&action=tokensupply
&contractaddress=0x02d06Ff5867C0797d2b9C338838Dc1c3A8BFfca2
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| contractaddress | GRC-20 代币的 合约地址 |
{
"status":"1",
"message":"success",
"data":"100000000000000000"
}
Tip: The
resultis returned to wei.
查询账户中GRC 20 代币的余额
返回指定地址当前持有的 GRC-20 代币余额。
https://gatescan.org/api
?module=account
&action=tokenbalance
&contractaddress=0x02d06Ff5867C0797d2b9C338838Dc1c3A8BFfca2
&address=0xc6ef7050fBe638ffD992343C4C8271B9aF605D6c
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| contractaddress | GRC-20 代币的 合约地址 |
| address | 用于查询代币余额的地址 字符串 |
{
"status":"1",
"message":"success",
"data":"100000000000000000"
}
Tip: The
resultis returned in the token's smallest decimal representation.
Eg. a token with a balance of215.241526476136819398and 18 decimal places will be returned as215241526476136819398
查询GRC20 在某个区块的历史发行总量
获取在特定区块高度下 GRC-20 代币的流通总量。
https://gatescan.org/api
?module=stats
&action=tokensupplyhistory
&contractaddress=0x02d06Ff5867C0797d2b9C338838Dc1c3A8BFfca2
&blockno=1000001
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| contractaddress | GRC-20 代币的 合约地址 |
| address | 用于查询代币余额的地址 字符串 |
{
"status":"1",
"message":"success",
"data":"100000000000000000"
}
Tip: The
resultis returned in the token's smallest decimal representation.
Eg. a token with a balance of215.241526476136819398and 18 decimal places will be returned as215241526476136819398
查询账户在某个区块的GRC20 余额
返回指定地址在特定区块高度时的 GRC-20 代币余额。
https://gatescan.org/api
?module=account
&action=tokenbalancehistory
&contractaddress=0x02d06Ff5867C0797d2b9C338838Dc1c3A8BFfca2
&address=0xc6ef7050fBe638ffD992343C4C8271B9aF605D6c
&blockno=1000001
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| contractaddress | GRC-20 代币的 合约地址 |
| blockno | 用于查询总供应量的区块高度(整数),例如:1000001 |
| address | 用于查询代币余额的地址 字符串 |
{
"status":"1",
"message":"success",
"data":"100000000000000000"
}
Tip: The
resultis returned in the token's smallest decimal representation.
Eg. a token with a balance of215.241526476136819398and 18 decimal places will be returned as215241526476136819398
获取某 GRC20 的 持有人列表
返回当前代币持有者及其持有的代币数量。
https://gatescan.org/api
?module=token
&action=tokenholderlist
&contractaddress=0x02d06Ff5867C0797d2b9C338838Dc1c3A8BFfca2
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| contractaddress | GRC-20 代币的 合约地址 |
{
"status":"1",
"message":"success",
"data":[
{
TokenHolderAddress: '0xc6ef7050fbe638ffd992343c4c8271b9af605d6c',
TokenHolderQuantity: '100000000000000000'
},
{
TokenHolderAddress: '0x0000000000000000000000000000000000000000',
TokenHolderQuantity: '0'
}
]
}
获取某 GRC20 的代币信息
返回 GRC20/GRC721/GRC1155 代币的项目信息及社交媒体链接。
https://gatescan.org/api
?module=token
&action=tokeninfo
&contractaddress=0x02d06Ff5867C0797d2b9C338838Dc1c3A8BFfca2
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| contractaddress | GRC-20 代币的 合约地址 |
{
"status":"1",
"message":"success",
"data":{
contract_address: '0x02d06ff5867c0797d2b9c338838dc1c3a8bffca2',
symbol: 'VEF',
name: 'Verify',
total_supply: '100000000000000000',
decimal: 9,
holder: 1,
transfer: 2,
type: 'GRC20'
}
}
获取账户拥有的GRC20 列表
返回指定地址持有的 GRC-20 代币及其数量。
https://gatescan.org/api
?module=account
&action=addresstokenbalance
&address=0xc6ef7050fBe638ffD992343C4C8271B9aF605D6c
&page=1
&offset=100
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| address | 用于查询代币余额的地址 字符串 |
| page | 页码编号,类型为 整数,在启用分页时使用 |
| offset | 每页显示的交易数量 |
{
"status":"1",
"message":"success",
"data":[
{
TokenAddress: '0x5b118a360e3cb792ce9baf9e31db8a0d433eb64b',
TokenQuantity: '0',
TokenName: 'test',
TokenSymbol: 'TT',
TokenDivisor: 18
},
{
TokenAddress: '0x99233ca43a0e9aa8ee5711e25e78a3420e6c9a5e',
TokenQuantity: '0',
TokenName: 'test',
TokenSymbol: 'TT',
TokenDivisor: 18
},
...
]
}
获取账户拥有的GRC721 列表
返回指定地址持有的 GRC-721 代币及其数量。
https://gatescan.org/api
?module=account
&action=addresstokennftbalance
&address=0x1877f7f5d174e154833fe2e2fe9817b37654538d
&page=1
&offset=100
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| address | 用于查询代币余额的地址 字符串 |
| page | 页码编号,类型为 整数,在启用分页时使用 |
| offset | 每页显示的交易数量 |
{
"status":"1",
"message":"success",
"data":[
{
TokenAddress: '0x12c4394ff84f8cc5ec7d01b4e7c6364f0abf3fb5',
TokenQuantity: 100,
TokenName: 'PXX',
TokenSymbol: 'PXX'
}
]
}
获取账户拥有的GRC721 token 的tokenid列表
返回指定地址的 GRC-721 代币清单,并可按合约地址进行过滤。
https://gatescan.org/api
?module=account
&action=addresstokennftinventory
&address=0x1877f7f5d174e154833fe2e2fe9817b37654538d
&contractaddress=0x12c4394ff84f8cc5ec7d01b4e7c6364f0abf3fb5
&page=1
&offset=100
&apikey=YourApiKeyToken
在 浏览器 中尝试此端点。
- 请求
- 响应
| 参数 | 描述 |
|---|---|
| address | 用于查询代币余额的地址 字符串 |
| contractaddress | 用于查询 GRC-721 代币清单的合约地址字符串 |
| page | 页码编号,类型为 整数,在启用分页时使用 |
| offset | 每页显示的交易数量 |
{
"status":"1",
"message":"success",
"data":[
{
TokenAddress: '0x12c4394ff84f8cc5ec7d01b4e7c6364f0abf3fb5',
TokenId: '71'
},
{
TokenAddress: '0x12c4394ff84f8cc5ec7d01b4e7c6364f0abf3fb5',
TokenId: '73'
},
...
]
}