Token
APIs to obtain token related details
VM Category Type
Value | Type | Description |
neovm | String | Neo VM |
wasvm | String | WASM VM |
1. Get token list by token type
Url RequestField | Type | Description |
token_type | String | oep4, oep5, oep8 |
page_size | int | number of records in one page (The page size is limited between 1 and 20) |
page_number | int | number of the page (At least 1 or greater) |
ResponseField | Type | Description |
contract_hash | String | contract hash |
name | String | contract name |
creator | String | creator address |
description | String | contract description |
logo | String | logo url |
create_time | int | create time |
update_time | int | update time |
contact_info | String | contact information.JSON format string |
total_supply | int | total supply of the token |
symbol | String | symbol of the token |
decimals | int | decimals of the token. If the token type is oep5, response not have this param |
address_count | int | total address |
tx_count | int | total transaction |
vm_category | String | neovm or wasmvm |
total | int | total contract |
OEP8 Token
If the param token_type
== oep8, then the result is:
2. Get token detail by token type and contracthash
Url RequestField | Type | Description |
token_type | String | oep4, oep5, oep8 |
contract_hash | String | contract_hash |
ResponseField | Type | Description |
contract_hash | String | contract hash |
name | String | contract name |
create_time | int | create time |
update_time | int | update time |
contact_info | String | contact information.JSON format string |
logo | String | logo url |
description | String | contract description |
creator | String | creator address |
ong_sum | String | total ong |
ont_sum | String | total ont |
address_count | int | total address |
tx_count | int | total transaction |
token_sum | String | total token.JSON format string |
type | String | oep4, oep5, oep8, others |
abi | String | contract abi |
code | String | contract code |
source_code | String | contract source code |
category | String | category |
total_supply | int | total supply of the token |
symbol | String | symbol of the token |
decimals | int | decimals of the token. If the token type is oep5, response not have this param |
vm_category | String | neovm or wasmvm |
OEP8 Token
If the param token_type
== oep8, then the result is:
3. Get oep8 token transaction list by token name
Url RequestField | Type | Description |
contract_hash | String | oep8 token contract hash |
token_name | String | oep8 token name |
page_size | int | number of records in one page (The page size is limited between 1 and 20) |
page_number | int | number of the page (At least 1 or greater) |
ResponseField | Type | Description |
records.tx_hash | String | transaction hash |
records.tx_type | int | transaction type (208/209) |
records.tx_time | int | UNIX time of the transaction |
records.block_height | int | block height |
records.confirm_flag | int | transaction state on the blockchain, 0:failure 1:success |
records.block_index | int | The index of transactions within a block |
records.fee | String | fee |
total | int | total |
4. Get circulating supply of ONT and ONG
URL Request Field | Type | Description |
---|---|---|
token | String | "ont" or "ong" |
Example Response
5. Get list of token holder addresses
Return addresses with balance greater than 0. The addresses retuned from the balckend has been processed, they are ready for display in the frontend directly without furuter processing. But the balance value requires the frontend to process based on the token's precision.
URL Request Parameter | Type | Description |
---|---|---|
qid | String | request ID, default: 1 |
contract | String | token contract address |
from | int | first entry to query |
count | int | number or entries to query |
Example Response
Response Parameter | Type | Description |
---|---|---|
address | String | token holder address |
contract | String | token contract address |
balance | String | value of token holder address balance multiplied by the token precision |
percent | Double | percentage of balance accounting for token total supply |
6. Get the number of token holders
Request Parameter | Type | Description |
---|---|---|
qid | String | request id, default: 1 |
contract | String | token contract address |
Example response
Response Parameter | Type | Description |
---|---|---|
result | int | number of addresses with a balance greater than 0 |
Last updated