Exchange rates
This endpoint provides daily exchange rates for a specified time range.
HTTP Request
bash
GET /market/v1/exchange-rates?base_currency={base_currency}&target_currency={target_currency}Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| base_currency | string | Yes | The original currency, e.g. USDT |
| target_currency | string | Yes | The target currency, e.g. USD |
| page | int | No | Current page, default 1 |
| page_size | int | No | Rows per page, default 20, max 100 |
| start_date | string | No | Start date, defaults to current date if not provided |
| end_date | string | No | End date, defaults to current date if not provided |
cURL Example
bash
curl --location --request GET '{$base_url}/market/v1/exchange-rates?base_currency=USDT&target_currency=USD&start_date=2025-06-20&end_date=2025-06-31' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'X-API-Signature: YOUR_GENERATED_SIGNATURE' \
--header 'X-API-Timestamp: 1746774142003'Success Response Format
The data field description of the request response.
| Name | Type | Description |
|---|---|---|
| base_currency | string | The original currency |
| target_currency | string | The target currency |
| rate | decimal | Exchange rate |
| update_time | string | Update time, UTC time |
Success Response Example
json
{
"code": 0,
"data": {
"total_records": 1,
"page": 1,
"page_size": 20,
"exchange_rates": [
{
"base_currency": "USDT",
"target_currency": "USD",
"rate": 0.995592025,
"update_time": "2025-06-26T01:41:32.1490152Z"
}
]
}
}Error Response Example
json
{
"code": 500,
"message": "Internal Service Error",
"details": ""
}
