Skip to content

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

NameTypeRequiredDescription
base_currencystringYesThe original currency, e.g. USDT
target_currencystringYesThe target currency, e.g. USD
pageintNoCurrent page, default 1
page_sizeintNoRows per page, default 20, max 100
start_datestringNoStart date, defaults to current date if not provided
end_datestringNoEnd 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.

NameTypeDescription
base_currencystringThe original currency
target_currencystringThe target currency
ratedecimalExchange rate
update_timestringUpdate 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": ""
}