AppController_getTokenPrice
GEThttps://api.socket.tech/v2/token-price
AppController_getTokenPrice
Request​
Query Parameters
tokenAddress stringrequired
Token contract address on network, e.g USDC on Ethereum Mainnet
Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
chainId stringrequired
ID of chain, e.g Ethereum Mainnet = 1
Example: 1
Header Parameters
API-KEY string
Responses​
- 200
Returns price of token for a given chain
- application/json
- Schema
- Example (from schema)
Schema
success booleanrequired
result
object
required
chainId number
tokenAddress string
tokenPrice number
currency string
{
"success": true,
"result": {
"chainId": 0,
"tokenAddress": "string",
"tokenPrice": 0,
"currency": "string"
}
}
Loading...