Skip to content

Get Quote

Retrieve a quote by trading pair

GEThttps://connect.cabital.com/api/v1/quotes/{pair}

Request Path Parameters

Parameter Required Description
pair Yes Trading pairs, format: buy_currency-sell_currency.
e.g. USDT-EUR presents the quote information of Buy USDT and Sell EUR

Response Parameters

Parameter Type Description
quote_id string Quote ID, format is timestamp:trading pair:purpose
* Note: The forward and reverse quote are the same quote ID.
quote string Quote value, is a relative price of one buy currency expressed in terms of sell currency.
reversed_quote string The quote value from inverse pair of pair.
valid_until number The absolute valid time of quote.
valid_interval number The absolute valid interval of quote, unit is second.

How to determine the trading pair is forward or reverse?

If the trading pair is as same as the trading pair in quote ID is "forward", if not the same is "reverse".
e.g. Quote ID is 20220623075537:ETH-EUR:Customer, the trading pair ETH-EUR is forward, EUR-ETH is reverse.

Example (USDT-EUR)

Request Data

curl "http://connect.cabital.com/api/v1/quotes/USDT-EUR"

Response Data

1
2
3
4
5
6
7
{
    "quote": "0.990854",
    "valid_until": 1659509205,
    "quote_id": "20220803064640:USDT-EUR:Customer", // πŸ‘ˆ  USDT-EUR is the same pair as the pair of requesting quotes (USDT-EUR), USDT-EUR is forward.
    "valid_interval": 5,
    "reversed_quote": "1.0256105203"
}

Example (EUR-USDT)

Request Data

curl "http://connect.cabital.com/api/v1/quotes/EUR-USDT"

Response Data

1
2
3
4
5
6
7
{
    "quote": "1.0256105203",
    "valid_until": 1659509205,
    "quote_id": "20220803064640:USDT-EUR:Customer", // πŸ‘ˆ USDT-EUR is not the same pair as the pair of requesting quotes (EUR-USDT), EUR-USDT is reversed.
    "valid_interval": 5,
    "reversed_quote": "0.990854"
}