Comment on page
🪙
Token Price
GET /v1/tokens/price?tokenId=<TOKEN_IDs>
This endpoint returns the USD price for a given token or a comma separated list of tokenId's. The
tokenId
parameter is required and should be a string in the format <TOKEN_CONTRACT_ADDRESS>:<NETWORK_ID>
. The TOKEN_CONTRACT_ADDRESS
is the address of the token contract on the specified network, and the NETWORK_ID
is the ID of the network the token is on. See supported networks for more info.tokenId
(required): A string in the format<TOKEN_CONTRACT_ADDRESS>:<NETWORK_ID>
that identifies the token to look up.
- x-api-key (required): A valid API key.
curl -X GET 'https://api.lynxcrypto.app/v1/tokens/price?tokenId=0x52ec25e58a9e144ff002625bb2aa58cc6da24cb2:56,0x9813037ee2218799597d83d4a5b6f3b6778218d9:1'
-H 'x-api-key: <YOUR_API_KEY>'
If querying for one tokenId you will be returned a single object.
{
"contract": "0x52ec25e58a9e144ff002625bb2aa58cc6da24cb2",
"chain": "56",
"name": "arcadekingdoms",
"symbol": "ack",
"usd_price": 0.0017911779847393145,
"price_change": -1.883584096628293
}
If querying for a list of tokens you will be returned an array of objects.
[
{
"contract": "0x52ec25e58a9e144ff002625bb2aa58cc6da24cb2",
"chain": "56",
"name": "arcadekingdoms",
"symbol": "ack",
"usd_price": 0.0017911779847393145,
"price_change": -1.883584096628293
},
{
"contract": "0x9813037ee2218799597d83d4a5b6f3b6778218d9",
"chain": "1",
"name": "bone shibaswap",
"symbol": "bone",
"usd_price": 1.5358275681156723,
"price_change": 10.671730513280767
}
]
200
: Success. Returns the USD price for the given token.400
: Bad Request. ThetokenId
query string parameter is not provided.- 403: Forbidden. The x-api-key header is not provided or is invalid.
404
: Not Found. Thetoken_id
is not found in thetokens
collection.
Last modified 9mo ago