Get Open Interest
Retrieve open interest data for all trading markets.
Endpoint
POST https://papi.synthetix.io/v1/infoRequest
Request Format
{
"params": {
"action": "getOpenInterest"
}
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
params.action | string | Yes | Must be "getOpenInterest" |
Response
Success Response
{
"status": "ok",
"response": [
{
"symbol": "BTC-USDT",
"openInterest": "1250.50",
"longOpenInterest": "750.25",
"shortOpenInterest": "500.25",
"timestamp": 1704067200000
},
{
"symbol": "ETH-USDT",
"openInterest": "8500.75",
"longOpenInterest": "4800.50",
"shortOpenInterest": "3700.25",
"timestamp": 1704067200000
},
{
"symbol": "SOL-USDT",
"openInterest": "45000.00",
"longOpenInterest": "25000.00",
"shortOpenInterest": "20000.00",
"timestamp": 1704067200000
}
],
"request_id": "5ccf215d37e3ae6d"
}Open Interest Object
| Field | Type | Description |
|---|---|---|
symbol | string | Trading pair symbol (e.g., "BTC-USDT") |
openInterest | string | Total open interest in base asset |
longOpenInterest | string | Long positions open interest in base asset |
shortOpenInterest | string | Short positions open interest in base asset |
timestamp | integer | Unix milliseconds timestamp when open interest was last updated |
Error Response
{
"status": "error",
"error": {
"message": "Failed to retrieve open interest data",
"code": "INTERNAL_ERROR"
},
"request_id": "5ccf215d37e3ae6d",
"timestamp": "2025-01-01T00:00:00Z"
}Code Examples
Get All Open Interest
{
"params": {
"action": "getOpenInterest"
}
}Open Interest Information
- All Markets: Returns open interest for all available trading pairs
- Real-time Data: Current open interest values
- String Format: Open interest returned as strings to preserve precision
- No Filtering: Always returns data for all markets
Use Cases
- Market Analysis: Understand market participation and liquidity
- Risk Assessment: Evaluate market depth and volatility
- Trading Strategy: Incorporate open interest into trading decisions
- Portfolio Management: Consider market activity in position sizing
- Market Research: Analyze trading volume and market sentiment
Open Interest Explained
- Definition: Total number of outstanding contracts (long + short positions)
- Market Indicator: Higher open interest often indicates more active trading
- Liquidity Measure: Markets with high open interest typically have better liquidity
- Trend Analysis: Changes in open interest can signal market direction
- Risk Metric: High open interest can indicate potential for large price moves
Validation Rules
- No authentication required
- No parameters to validate
- Returns data for all available markets
Error Handling
Common error scenarios:
| Error | Description |
|---|---|
| Invalid signature | EIP-712 signature validation failed |
| Invalid market symbol | Market symbol not recognized |
| Nonce already used | Nonce must be greater than previous value |
| Rate limit exceeded | Too many requests in time window |
| Request expired | expiresAfter timestamp has passed |
| Error | Description |
|---|---|
| Open interest data unavailable | Failed to retrieve open interest data |
| Internal error | Service temporarily unavailable |
Rate Limiting
- Default: 1000 requests per minute per IP
- Burst: Up to 100 requests per second
- Data Updates: Open interest updates in real-time
Data Format Notes
- String Format: All values returned as strings to preserve precision
- No Decimals: Open interest typically represented as whole numbers
- Symbol Format: Uses standard trading pair format
Related Endpoints
- Get Markets - Market configuration
- Get Funding Rate - Funding rates
- Get Market Prices - Current market prices