Subscribing to the contract updates provides real-time data on changes and status of the contracts and indices.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "market.contract_updates.subscribe",
  "params":{}
}

Parameters:

  • with_snapshot: Whether to include the snapshot in the response. It may incur additional API credit spending.
  • from_block_id: Specifies the block from which to start sending the events. See more information about this in the Managing Data Integrity section.

Snapshots

The snapshot format is the same as /v1/market/futures and /v1/market/indices endpoint responses. Upon subscription, the lists of active positions and indices are provided:

{
  "jsonrpc": "2.0",
  "method": "market.contract_updates.snapshot",
  "params": {
    "contracts": [
      {
        "contract_exponent": "1",
        "contract_id": 4,
        "contract_size": "10",
        "index": "ETH",
        "index_id": 2,
        "index_price": "3892.91",
        "last_price": "3925.5957",
        "mark_price": "3965.9883",
        "max_limit_order_price": "5947.9883",
        "min_limit_order_price": "1982.9883",
        "min_order_size_assets": "0.01",
        "min_order_size_contracts": "0.001",
        "price_precision": "1",
        "price_tick": "10000",
        "settlement_time": "2025-03-28T00:00:00Z",
        "start_time": "2024-11-25T00:00:00Z",
        "status": "active",
        "step_exponent": "-2",
        "step_size_assets": "0.01",
        "step_size_contracts": "0.001",
        "symbol": "ETH-28MAR25"
      }
    ],
    "indices": [
      {
        "active": true,
        "description": "...",
        "icon": "...",
        "index_id": 1,
        "long_description": "...",
        "price": "98904",
        "symbol": "BTC",
        "website_url": "https://bitcoin.org",
        "white_paper_url": "https://bitcoin.org/bitcoin.pdf"
      }
    ]
  }
}

Events

Possible event types are: index_created, index_updated, contract_created, contract_updated, contract_settlement_started, contract_settled.

{
  "jsonrpc": "2.0",
  "method": "market.contract_updates.event",
  "params": {
    "data": {
      "symbol": "ETH",
      "tx_info": {
        "block_timestamp": "2024-09-06T15:41:15Z",
        "event_id": "699091-4",
        "transaction_hash": "0x4d5126ddcafd63b04bb447f9931844d2c8d04c267f7381c2893a56dd293ac47d"
      },
      "type": "index_created"
    }
  }
}