Skip to main content

Token

Get WYZ-20 or WYZ-721 token supply by contract address.

Returns the current amount of an WYZ-20 token in circulation.

?module=token
&action=getToken
&contractaddress={contractAddressHash}
NameDescription
Module*

string (query) | A string with the name of the module to be invoked.

Must be set to: token | | Action*

string (query) | A string with the name of the action to be invoked.

Must be set to: getToken | | contractAddress

(string query) | A 160-bit code used for identifying contracts. |

Responses

Code 200(successful)

{
"message": "OK",
"result": {
"cataloged": true,
"contractAddress": "0x0000000000000000000000000000000000000000",
"decimals": "18",
"name": "Example Token",
"symbol": "ET",
"totalSupply": "1000000000",
"type": "WYZ-20"
},
"status": "1"
}

Code 200 (error)

{
"message": "Invalid contract address format",
"result": null,
"status": "0"
}

Get WYZ20-Token Account Balance for TokenContractAddress

Returns the current balance of an WYZ-20 token of an address.

     ?module=account
&action=tokenbalance
&contractaddress= {contractAddressHash}
&address= (addressHash}
&tag=latest&apikey=YourApiKeyToken

Parameter

NameDescription
contractaddressthe contract address of the WYZ-20 token
addressthe string representing the address to check the token address

Get token holders by contract address.

Return the current WYZ20 token holders and number of tokens held.

?module=token
&action=getTokenHolders
&contractaddress={contractAddressHash}

Parameters

NameDescription
Module*

string (query) | A string with the name of the module to be invoked.

Must be set to: token | | Action*

string (query) | A string with the name of the action to be invoked.

Must be set to: getTokenHolders | | contractAddress

(string query) | A 160-bit code used for identifying contracts. | | page | A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. | | offset | A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. |

Responses

Code 200 (Successful)

{
"message": "OK",
"result": [
{
"address": "0x0000000000000000000000000000000000000000",
"value": "965208500001258757122850"
}
],
"status": "1"
}

Code 200 (error)

{
"message": "Invalid contract address format",
"result": null,
"status": "0"
}

Get bridged tokens list.

Returns the list of bridged WYZ-20 token.

?module=token
&action=bridgedTokenList

Parameters

NameDescription
Module*

string (query) | A string with the name of the module to be invoked.

Must be set to: token | | Action*

string (query) | A string with the name of the action to be invoked.

Must be set to: bridgedTokenList | | contractAddress

(string query) | A 160-bit code used for identifying contracts. | | page | A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. | | offset | A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. |

Responses

Code 200 (Successful)

{
"message": "OK",
"result": [
{
"foreignChainId": "1",
"foreignTokenContractAddressHash": "0x0ae055097c6d159879521c384f1d2123d1f195e6",
"homeContractAddressHash": "0xb7d311e2eb55f2f68a9440da38e7989210b9a05e",
"homeDecimals": "18",
"homeHoldWYZount": 393,
"homeName": "STAKE on xDai",
"homeSymbol": "STAKE",
"homeTotalSupply": "1484374.775044204093387391",
"homeUsdValue": "18807028.39981006586321824397"
},
{
"foreignChainId": "1",
"foreignTokenContractAddressHash": "0xf5581dfefd8fb0e4aec526be659cfab1f8c781da",
"homeContractAddressHash": "0xd057604a14982fe8d88c5fc25aac3267ea142a08",
"homeDecimals": "18",
"homeHoldWYZount": 73,
"homeName": "HOPR Token on xDai",
"homeSymbol": "HOPR",
"homeTotalSupply": "26600449.86076749062791602",
"homeUsdValue": "6638727.472651464170990256943"
}
],
"status": "1"
}