Get Batch Token Price#
Retrieve the latest price for multiple tokens
Request URL#
POST https://web3.okx.com/api/v5/dex/market/price-info
Request Parameters#
Parameter | Type | Required | Description |
---|---|---|---|
chainIndex | String | Yes | Unique identifier for the chain. e.g., 1 : Ethereum. See more here. |
tokenContractAddress | String | Yes | Token contract address (e.g., 0x382bb369d343125bfb2117af9c149795c6c65c50),Supports batch queries:Up to 100 addresses can be entered, separated by commas. |
Response Parameters#
Parameter | Type | Description |
---|---|---|
chainIndex | String | Unique identifier for the chain (e.g., 1: Ethereum; see more here). |
tokenContractAddress | String | Token contract address (e.g., 0x382bb369d343125bfb2117af9c149795c6c65c50) |
time | String | Timestamp of the price, Unix timestamp format in milliseconds |
price | String | Latest token price |
marketCap | String | Token marketcap |
priceChange5M | String | 5 min price change |
priceChange1H | String | 1 hour price change |
priceChange4H | String | 4 hour price change |
priceChange24H | String | 24 hour price change |
volume5M | String | 5 min volume |
volume1H | String | 1 hour volume |
volume4H | String | 4 hour volume |
volume24H | String | 24 hour volume |
Request Example#
shell
curl --location --request POST 'https://web3.okx.com/api/v5/dex/market/price' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z' \
--data-raw '[
{
"chainIndex": "66",
"tokenContractAddress":"0x382bb369d343125bfb2117af9c149795c6c65c50"
}
]'
Response Example#
200
{
"code":"0",
"msg":"",
"data":[
{
"chainIndex": "66",
"tokenContractAddress": "0x382bb369d343125bfb2117af9c149795c6c65c50",
"time": "1716892020000",
"price": "26.458143090226812",
"marketCap": "27036475.39446733583542349",
"priceChange5M": "-2.12",
"priceChange1H": "1",
"priceChange4H": "-4.69",
"priceChange24H": "61.4",
"volume5M": "95979.673920807940184",
"volume1H": "1101091.054193115633995724",
"volume4H": "3944418.057408155962911033",
"volume24H": "16606779.022519656093301767"
}
]
}