Skip to content

Get Open Interest

Retrieve open interest data for all trading markets.

Endpoint

POST https://papi.synthetix.io/v1/info

Request

Request Format

{
  "params": {
    "action": "getOpenInterest"
  }
}

Request Parameters

ParameterTypeRequiredDescription
params.actionstringYesMust 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

FieldTypeDescription
symbolstringTrading pair symbol (e.g., "BTC-USDT")
openIntereststringTotal open interest in base asset
longOpenIntereststringLong positions open interest in base asset
shortOpenIntereststringShort positions open interest in base asset
timestampintegerUnix 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:

ErrorDescription
Invalid signatureEIP-712 signature validation failed
Invalid market symbolMarket symbol not recognized
Nonce already usedNonce must be greater than previous value
Rate limit exceededToo many requests in time window
Request expiredexpiresAfter timestamp has passed
ErrorDescription
Open interest data unavailableFailed to retrieve open interest data
Internal errorService 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