Market

Get OHLC and average price for one asset

GET/v1/currency/ohlca/{symbol}

Returns open, high, low, close and average USD prices for one asset over a window that ends at time and spans timeframe backwards. With timeframe=1D and no time, the window is the last 24 hours.

The symbol can be a crypto or a fiat currency. All prices are decimal strings in USD, derived from the stored rates against the dollar. average is the inverse of the mean rate over the window, which is a harmonic mean of the price rather than an arithmetic one. A value of "0" means the stored rate was zero.

404 means the service has no rates for that asset inside the window.

No authentication is required.

Path Parameters

symbol*string

Asset symbol, such as BTC or EUR. Case-sensitive.

Match^[A-Z0-9]{1,10}$

Query Parameters

timeframe*string

Length of the window, counted backwards from time.

Value in

  • "1H"
  • "4H"
  • "12H"
  • "1D"
  • "1W"
  • "1M"
  • "1Y"
time?string

End of the window, as an ISO 8601 datetime. Defaults to the current time.

Formatdate-time

Response Body

application/json

application/json

application/json

Get OHLC and average price for one asset
curl --request GET \  --url 'https://gateway.bit2me.com/v1/currency/ohlca/BTC?timeframe=1D&time=2024-09-24T00%3A00%3A00.000Z'
{  "average": "77577.56473380463",  "close": "78823.60190245666",  "high": "78997.7573705082",  "low": "76739.54602946785",  "open": "76863.33264249183"}