Skip to main content
GET
/
token
/
price
Get Token USD Price
curl --request GET \
  --url https://api-test.uniblock.dev/uni/v1/token/price \
  --header 'X-API-KEY: <api-key>'
{
  "usdPrice": "1.001",
  "name": "Tether",
  "symbol": "USDT",
  "address": "0x...",
  "decimals": "6",
  "logo": "https://static.alchemyapi.io/images/assets/825.png",
  "exchangeName": "uniswap",
  "exchangeAddress": "0x...",
  "updatedAt": "2023-05-20T02:58:53.987519619Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-KEY
string
header
required

API key to access the API (optional)

Query Parameters

chainId
string
default:1
required

Unique identifier for a blockchain network. Use a single value for same-chain batch queries or comma-separated values aligned with each contract address for cross-chain batch queries.

Example:

"1,137"

contractAddress
string
default:0xdAC17F958D2ee523a2206206994597C13D831ec7
required

The token contract address to query. Use comma-separated values for batch queries. For same-chain batches, provide one chainId with multiple contract addresses. For cross-chain batches, provide matching comma-separated chainId and contractAddress values in the same order.

Example:

"0xdAC17F958D2ee523a2206206994597C13D831ec7,0xc2132D05D31c914a87C6611C10748AEb04B58e8F"

exchange
enum<string>

The exchange to query the price from.

Available options:
uniswap-v2,
uniswap-v3,
sushiswap-v2,
pancakeswap-v1,
pancakeswap-v2,
quickswap
includeRaw
boolean

Returns the raw data given by the provider. WARNING: removes backup feature, and raw data returned is not normalized which might make switching providers difficult

Example:

null

provider
enum<string>

Specify which provider to use. The project's provider priority list is used by default if no providers are selected. (Priority list can be managed on Uniblock's dashboard)

Available options:
Alchemy,
GoldRush,
Moralis

Response

200 - application/json
usdPrice
object
required
Example:

"1.001"

name
object
required
Example:

"Tether"

symbol
object
required
Example:

"USDT"

address
object
required
Example:

"0x..."

decimals
object
required
Example:

"6"

Example:

"https://static.alchemyapi.io/images/assets/825.png"

exchangeName
object
required
Example:

"uniswap"

exchangeAddress
string
required
Example:

"0x..."

updatedAt
object
required
Example:

"2023-05-20T02:58:53.987519619Z"