Skip to main content

Overview

The Market Data API provides access to real-time market information including open interest, insurance fund balance, instrument details, and trading calendars for all supported instruments.

Get Open Interest

Retrieve open interest data for perpetual instruments.

Endpoint

GET /api/v1/market/open-interest

Parameters

symbol
string
required
Trading symbol (e.g., “OIL-BTC”, “GOLD-BTC”, “US500-BTC”)
instType
string
required
Instrument type. Currently only “perpetual” is supported.

Example Request

curl -X GET "https://api.roxom.com/api/v1/market/open-interest?symbol=OIL-BTC&instType=perpetual"

Response

{
  "data": {
    "openInterest": 12345,
    "timestamp": 1642678800000
  },
  "error": false
}
data
object
Open interest data for the requested instrument

Get Insurance Fund Balance

Retrieve the current insurance fund balance.

Endpoint

GET /api/v1/market/insurance-fund

Parameters

unit
string
required
Units for the response. Options: “sats” or “btc”. Default: “btc”

Example Request

curl -X GET "https://api.roxom.com/api/v1/market/insurance-fund?unit=btc"

Response

{
  "data": {
    "balance": "5000000",
    "updatedAt": 1642678800000,
    "unit": "btc"
  },
  "error": false
}
data
object
Insurance fund balance information

Get Trading Calendars

Retrieve trading calendars for instruments.

Endpoint

GET /api/v1/market/calendars

Parameters

symbol
string
required
Filter by trading symbol (e.g., “OIL-BTC”, “GOLD-BTC”, “US500-BTC”)

Example Request

curl -X GET "https://api.roxom.com/api/v1/market/calendars?symbol=OIL-BTC"

Response

{
  "data": {
    "calendars": [
      {
        "id": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "name": "US Markets",
        "code": "US",
        "timezone": "America/New_York",
        "openHour": "09:30",
        "closeHour": "16:00",
        "openDayBefore": false,
        "openOnWeekends": false,
        "holidays": [
          {
            "date": "2024-01-01",
            "lateOpenTime": null,
            "earlyCloseTime": null,
            "description": "New Year's Day"
          }
        ]
      }
    ]
  },
  "error": false
}
data.calendars
array
List of trading calendars

Get Instruments

Retrieve available trading instruments.

Endpoint

GET /api/v1/instruments

Parameters

instType
string
required
Filter by instrument type. Options: “perpetual”
symbol
string
required
Filter by trading symbol
tradeable
boolean
required
Filter to show only tradeable instruments. Default: true
unit
string
required
Units for the response. Options: “sats” or “btc”. Default: “btc”

Example Request

curl -X GET "https://api.roxom.com/api/v1/instruments?instType=perpetual&unit=btc"

Response

{
  "data": {
    "instruments": [
      {
        "id": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "symbol": "GOLD-BTC",
        "instrumentType": "perpetual",
        "quantityTickSize": "0.01",
        "contractSize": 1,
        "tickSize": "0.00000100",
        "baseDecimals": 2,
        "quoteDecimals": 8,
        "maxOrderSize": "250000000",
        "minOrderPrice": "0.00000001",
        "maxOrderPrice": "50.00000000",
        "maxLeverage": "10.0000",
        "maintenanceMarginRatio": "50.00%",
        "btcUnits": "btc"
      }
    ]
  },
  "error": false
}
data.instruments
array
List of available trading instruments

Get Instrument Statistics

Retrieve 24-hour statistics for instruments.

Endpoint

GET /api/v1/instruments/stats

Parameters

symbol
string
required
Filter by trading symbol
unit
string
required
Units for price values. Options: “sats” or “btc”. Default: “btc”

Example Request

curl -X GET "https://api.roxom.com/api/v1/instruments/stats?symbol=OIL-BTC&unit=btc"

Response

{
  "data": {
    "stats": [
      {
        "id": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "symbol": "OIL-BTC",
        "indexPrice": "50000",
        "markPrice": "50010",
        "todayHigh": "50100",
        "todayLow": "49900",
        "volume24h": "1000000",
        "close1d": "49950",
        "high24h": "50100",
        "low24h": "49900",
        "fundingRate": "0.00010000",
        "openInterest": "12345",
        "openInterestVolume": "12.34500000",
        "createdAt": 1642678800000
      }
    ]
  },
  "error": false
}
data.stats
array
List of instrument statistics

Error Handling

All market data endpoints return consistent error responses:
{
  "data": {
    "code": 5003,
    "message": "Invalid instrument"
  },
  "error": true
}
data
object
Error details

Rate Limits

Market data endpoints have generous rate limits suitable for real-time applications:
  • Open Interest: 100 requests per minute
  • Insurance Fund: 60 requests per minute
  • Calendars: 100 requests per minute
  • Instruments: 200 requests per minute
  • Statistics: 100 requests per minute

Data Freshness

  • Open Interest: Updated every 5 minutes
  • Insurance Fund: Updated every minute
  • Calendars: Static data, updated when trading hours change
  • Instruments: Static data, updated when new instruments are added
  • Statistics: Updated every minute during trading hours

Next Steps