π¨οΈToken Data
Endpoint
GET /v1/tokens/metadata?tokenId=<TOKEN_ID>
Description
This endpoint returns metadata for a given token or an array of comma-separated tokenIds.
Query String Parameters
tokenId(required): A string in the format<TOKEN_CONTRACT_ADDRESS>:<NETWORK_ID>that identifies the token to look up.
Headers
x-api-key (required): A valid API key.
Example
curl -X GET 'https://api.lynxcrypto.app/v1/tokens/metadata?tokenId=0x52ec25e58a9e144ff002625bb2aa58cc6da24cb2:56,0x9813037ee2218799597d83d4a5b6f3b6778218d9:1'
-H 'x-api-key: <YOUR_API_KEY>'Response
If querying for a single token you will receive a single object.
{
"chain": "56",
"name": "tokenname",
"symbol": "tkn",
"usd_price": 0.0014396311038279241,
"price_change": 0.49469613773794374,
"decimals": 18,
"total_supply": 100000000
}If querying for a list of tokens you will receive an array of objects.
Response Codes
200: Success. Returns the USD price for the given token.400: Bad Request. ThetokenIdquery string parameter is not provided.403: Forbidden. The x-api-key header is not provided or is invalid.
404: Not Found. Thetoken_idis not found in thetokenscollection.
Last updated