Tokens
GET /v1/p/tokens
Get details for all tokens.
- HTTP
- Python
curl -X GET "$ETHGAS_API_URL/v1/p/tokens"
import requests
url = f"{ETHGAS_API_URL}/v1/p/tokens"
response = requests.get(url)
print(response.text)
Request
No parameters for this endpoint.
Response Body
| Name | Type | Description |
|---|---|---|
| tokens | object[] | List of token objects |
| └ tokenId | integer | ETHGas Token ID (see Token IDs) |
| └ code | string | Token code |
| └ name | string | Token name |
| └ tokenAddress | string | Token chain address |
| └ decimals | integer | Number of decimal precision |
| └ withdrawFee | string | Withdrawal fee (in number of tokens) |
| └ price | string | Latest token price |
Example Response
{
"success": true,
"data": {
"tokens": [
{
"tokenId": 1,
"code": "ETH",
"name": "Wrapped ETH",
"tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"decimals": 18,
"nativeToken": false,
"withdrawFee": "0.01",
"price": "1582.09761118"
}
]
}
}