Skip to main content

Get all current rates

GET 

/v1/exchangerate/:asset_id_base

Get the current exchange rate between requested asset and all other assets.

info

If you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.

info

You can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 / (USD/BTC);

Request

Path Parameters

    asset_id_base stringrequired

    Requested exchange rates base asset identifier (from the Metadata -> Assets)

Query Parameters

    filter_asset_id string

    Comma or semicolon delimited asset identifiers used to filter response (optional)

    invert boolean

    True will invert all the rates (optional, if true then rates will be calculated as rate = 1 / actual_rate eg. USD/BTC as BTC/USD)

    time string

    Time for historical rates (optional)

Responses

successful operation

Schema

    asset_id_base stringnullable

    Gets or sets the base asset ID.

    rates

    object[]

    nullable

    Gets or sets the list of exchange rates.

  • Array [

  • time date-time

    Gets or sets the time of the exchange rate.

    asset_id_quote stringnullable

    Gets or sets the quote asset ID of the exchange rate.

    rate double

    Gets or sets the exchange rate value.

  • ]

Loading...