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
Trading symbol (e.g., “OIL-BTC”, “GOLD-BTC”, “US500-BTC”)
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
}
Open interest data for the requested instrument Show Open interest properties
Current open interest value
Timestamp when the data was last updated (milliseconds)
Get Insurance Fund Balance
Retrieve the current insurance fund balance.
Endpoint
GET /api/v1/market/insurance-fund
Parameters
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
}
Insurance fund balance information Show Insurance fund properties
Current insurance fund balance
Timestamp when the balance was last updated (milliseconds)
Units for the balance (sats or btc)
Get Trading Calendars
Retrieve trading calendars for instruments.
Endpoint
GET /api/v1/market/calendars
Parameters
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
}
List of trading calendars Unique calendar identifier
Calendar name (e.g., “US Markets”)
Calendar code (e.g., “US”)
Calendar timezone (e.g., “America/New_York”)
Market open hour (HH:MM format)
Market close hour (HH:MM format)
Whether market opens the day before
Whether market is open on weekends
List of holidays and special trading hours Holiday date (YYYY-MM-DD format)
Late open time on this date (HH:MM format)
Early close time on this date (HH:MM format)
Get Instruments
Retrieve available trading instruments.
Endpoint
Parameters
Filter by instrument type. Options: “perpetual”
Filter to show only tradeable instruments. Default: true
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
}
List of available trading instruments Show Instrument properties
Unique instrument identifier
Trading symbol (e.g., “GOLD-BTC”, “OIL-BTC”, “US500-BTC”)
Type of instrument (currently only “perpetual”)
Minimum quantity increment
Number of decimal places for base asset
Number of decimal places for quote asset
BTC denomination unit used in the response
Get Instrument Statistics
Retrieve 24-hour statistics for instruments.
Endpoint
GET /api/v1/instruments/stats
Parameters
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
}
List of instrument statistics Show Statistics properties
Previous day’s closing price
Timestamp when statistics were created (milliseconds)
Error Handling
All market data endpoints return consistent error responses:
{
"data" : {
"code" : 5003 ,
"message" : "Invalid instrument"
},
"error" : true
}
Error details Domain-specific error code
Human-readable error message
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