API Reference

Return the latest prices for up to 10,000 tokens in a single request.

Log in to see full request history

Method: GET

Endpoint: https://api.syve.ai/v1/price-api/batch-latest-token-prices

📘

Fetching 10,000 tokens in a single request

You have to use a POSTrequest. GET requests are limited to 25 addresses per request. Look at the example at the bottom of this page for how to construct a POST request.

Request Parameters

NameType(s)Description
token_addressstringThis is the address or list of addresses for which to return latest price information for.

If making a GET request use a comma separated list to provide the list of addresses. If POST use a list in the request body.

This is a required parameter.
price_typestringThe type of price to return in the response.

Valid options: price_token_usd_robust_tick_1 and price_token_usd_tick_1.

The default is price_token_usd_robust_tick_1.

📘

Possible price types

The possible price types correspond to the prices returned by our DEX Trades table. Each price type corresponds to a different method of calculating price.

Price TypeDescription
price_token_usd_tick_1The price at which a token was traded based on the most recent swap.
price_token_usd_robust_tick_1The same as price_token_usd_tick_1 but with significant outliers removed.

Response Fields

NameTypeDescription
block_numberintegerThe block number (i.e. height) of the event log.
timestampintegerUNIX timestamp in seconds.

The zero value corresponds to the 1st of January 1970 at UTC, called the Unix Epoch.
transaction_hashstringThe transaction has of the transaction that the DEX trade happened in.
price_usddoubleThe price of the token denominated in dollars.
price_ethdoubleThe price of the token denominated in ether.

Example: Latest tick prices for $UNIBOT and $PEPE

📘

Try it out

In the Live Example section you can try out the request with different arguments.

Query

In the requests below 0xf819d9cb1c2a819fd991781a822de3ca8607c3c9 is the address of $UNIBOT and 0x6982508145454ce325ddbe47a25d4ec3d2311933 of $PEPE.

Example GET Request

Request: https://api.syve.ai/v1/price-api/batch-latest-token-prices?token_address=0xf819d9cb1c2a819fd991781a822de3ca8607c3c9,0x6982508145454ce325ddbe47a25d4ec3d2311933

Example POST Request

curl --location --request POST 'https://api.syve.ai/v1/price-api/batch-latest-token-prices' \ --header 'Content-Type: application/json' \ --data '{ "token_address": [ "0xf819d9cb1c2a819fd991781a822de3ca8607c3c9", "0x6982508145454ce325ddbe47a25d4ec3d2311933" ] }'

Here 0xf819d9cb1c2a819fd991781a822de3ca8607c3c9 is the address of $UNIBOT token.

Try in Postman: https://www.postman.com/dark-equinox-191074/workspace/syve-examples/request/11895150-1cfe550a-0b5a-4746-a0ee-25d37f3c7f51?ctx=documentation

Response

[ { "token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933", "token_symbol": "PEPE", "token_name": "Pepe", "block_number": 18333929, "timestamp": 1697108795, "transaction_hash": "0x062e05f693b2f3ca00edb59f53a7cdb8c8df190771fe7f986605f7451fa7bcde", "price_eth": 4.054870659777217e-10, "price_usd": 6.261077866620348e-7 }, { "token_address": "0xf819d9cb1c2a819fd991781a822de3ca8607c3c9", "token_symbol": "UNIBOT", "token_name": "Unibot", "block_number": 18333885, "timestamp": 1697108267, "transaction_hash": "0x24b890f15604abd045ba46d2b619926a43eca01022af5c79de8c241b187dd16a", "price_eth": 0.027875131022242906, "price_usd": 42.988781047321275 } ]

Live Example

Press Try It to make a request and see what the response looks like. Feel free to try different query parameters.

Query Params
string
Defaults to 0xf819d9cb1c2a819fd991781a822de3ca8607c3c9,0x6982508145454ce325ddbe47a25d4ec3d2311933
string
Defaults to price_token_usd_tick_1
Language
Click Try It! to start a request and see the response here!