---
updatedAt: 2026-06-02T20:06:00.000Z
agentTools:
  projectIndex: https://docs.zerohash.com/llms.txt
---

# Market data subscription

Subscribe to market data for CLOB instrument.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "zerohash API",
    "description": "\n### Authentication\n\nzerohash Uses HMAC SHA-256 verification to ensure the authenticity of API requests, follow instructions by link [https://docs.zerohash.com/reference/api-authentication](https://docs.zerohash.com/reference/api-authentication)\n\n<a href=\"/zh-swagger.json\">Download zerohash OpenAPI Schema as JSON</a>\n",
    "version": "1.7.0"
  },
  "servers": [
    {
      "url": "https://api.cert.zerohash.com",
      "description": "Certification API server"
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "CLOB",
      "description": "Central Limit Order Book"
    }
  ],
  "paths": {
    "/orders/v1/create_market_data_subscription": {
      "post": {
        "tags": [
          "CLOB"
        ],
        "summary": "Market data subscription",
        "description": "Subscribe to market data for CLOB instrument.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Signature"
          },
          {
            "$ref": "#/components/parameters/Timestamp"
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMarketDataSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMarketDataSubscriptionResponse"
                }
              }
            }
          },
          "default": {
            "description": "An error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCLOBGeneric"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiKey": [],
      "apiPassphrase": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "description": "Your API public key. See the [Authentication guide](https://docs.zerohash.com/reference/api-authentication) for how to obtain keys.",
        "in": "header",
        "name": "X-SCX-API-KEY"
      },
      "apiPassphrase": {
        "type": "apiKey",
        "description": "The passphrase associated with your API key, set when the key was created.",
        "in": "header",
        "name": "X-SCX-PASSPHRASE"
      }
    },
    "parameters": {
      "Signature": {
        "name": "X-SCX-SIGNED",
        "in": "header",
        "description": "HMAC-SHA256 signature of the request, base64-encoded. See the [Authentication guide](https://docs.zerohash.com/reference/api-authentication) for the exact signing formula.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "Timestamp": {
        "name": "X-SCX-TIMESTAMP",
        "in": "header",
        "description": "Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "1678901234"
        }
      }
    },
    "schemas": {
      "ErrorCLOBGeneric": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type_url": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "PostMarketDataSubscriptionRequest": {
        "type": "object",
        "properties": {
          "depth": {
            "type": "integer",
            "example": "0",
            "description": "The depth of the market data"
          },
          "snapshotOnly": {
            "type": "boolean",
            "example": true,
            "description": "Indicates if only a snapshot of the market data is requested"
          },
          "symbols": {
            "type": "array",
            "description": "The array of symbols to subscribe to for market data",
            "items": {
              "type": "string",
              "example": "BTC/USD"
            }
          },
          "unaggregated": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "PostMarketDataSubscriptionResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "example": 0
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "@type": {
                      "type": "string",
                      "example": "string"
                    }
                  }
                }
              },
              "message": {
                "type": "string",
                "example": "string"
              }
            }
          },
          "result": {
            "type": "object",
            "properties": {
              "heartbeat": {
                "type": "object",
                "example": {}
              },
              "update": {
                "type": "object",
                "description": "Market data update",
                "properties": {
                  "bids": {
                    "type": "array",
                    "description": "List of bid orders",
                    "items": {
                      "type": "object",
                      "properties": {
                        "px": {
                          "type": "string",
                          "example": "11265651",
                          "description": "The price of the order scaled by the instrument's `price_scale`"
                        },
                        "qty": {
                          "type": "string",
                          "example": "44649217",
                          "description": "The quantity of the order scaled by the instrument's `fractional_qty_scale`"
                        },
                        "symbolSubType": {
                          "type": "string",
                          "example": "",
                          "description": "The symbol sub-type"
                        }
                      }
                    }
                  },
                  "offers": {
                    "type": "array",
                    "description": "List of offer orders",
                    "items": {
                      "type": "object",
                      "properties": {
                        "px": {
                          "type": "string",
                          "example": "10223023",
                          "description": "The price of the order scaled by the instrument's `price_scale`"
                        },
                        "qty": {
                          "type": "string",
                          "example": "192335645",
                          "description": "The quantity of the order scaled by the instrument's `fractional_qty_scale`"
                        },
                        "symbolSubType": {
                          "type": "string",
                          "example": "",
                          "description": "The symbol sub-type"
                        }
                      }
                    }
                  },
                  "bookHidden": {
                    "type": "boolean",
                    "example": true,
                    "description": "Indicates if the order book is hidden"
                  },
                  "state": {
                    "type": "string",
                    "example": "INSTRUMENT_STATE_CLOSED",
                    "description": "The current state of the instrument"
                  },
                  "stats": {
                    "type": "object",
                    "description": "Trading statistics for the filtered symbol",
                    "properties": {
                      "closePx": {
                        "type": "string",
                        "example": "11225624",
                        "description": "The closing price"
                      },
                      "closeSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z",
                        "description": "The closing time"
                      },
                      "highPx": {
                        "type": "string",
                        "example": "11225624",
                        "description": "The highest price"
                      },
                      "highSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z",
                        "description": "The time at which the highest price was set"
                      },
                      "indicativeOpenPx": {
                        "type": "string",
                        "example": "11225624",
                        "description": "The indicative open price"
                      },
                      "indicativeOpenSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z",
                        "description": "The time at which the indicative open price was set"
                      },
                      "lastTradePx": {
                        "type": "string",
                        "example": "11229296",
                        "description": "The last trade price"
                      },
                      "lastTradeQty": {
                        "type": "string",
                        "example": "11227248",
                        "description": "The last trade quantity"
                      },
                      "lastTradeSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z"
                      },
                      "lowPx": {
                        "type": "string",
                        "example": "11225624",
                        "description": "The lowest price"
                      },
                      "lowSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z"
                      },
                      "notionalTraded": {
                        "type": "string",
                        "example": "1392987124878",
                        "description": "The notional traded amount"
                      },
                      "notionalSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z"
                      },
                      "openInterest": {
                        "type": "string",
                        "example": "0",
                        "description": "The open interest"
                      },
                      "openInterestSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z"
                      },
                      "openPx": {
                        "type": "string",
                        "example": "13929873",
                        "description": "The opening price"
                      },
                      "openSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z"
                      },
                      "settlementPreliminaryFlag": {
                        "type": "boolean",
                        "example": true
                      },
                      "settlementPriceCalculationMethod": {
                        "type": "string",
                        "example": "SETTLEMENT_PRICE_CALCULATION_METHOD_UNSET"
                      },
                      "settlementPx": {
                        "type": "string",
                        "example": "139298712",
                        "description": "The settlement price"
                      },
                      "settlementSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z"
                      },
                      "sharesTraded": {
                        "type": "string",
                        "example": "48728312",
                        "description": "The number of shares traded"
                      },
                      "tradingReferencePx": {
                        "type": "string",
                        "example": "139298712",
                        "description": "The trading reference price"
                      },
                      "tradingReferenceSetTime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-07-08T11:35:10.379Z",
                        "description": "The time at which the trading reference price was set"
                      }
                    }
                  },
                  "symbol": {
                    "type": "string",
                    "example": "BTC/USD",
                    "description": "The trading pair symbol"
                  },
                  "transactTime": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2025-07-08T11:35:10.379Z",
                    "description": "The time at which the transaction occurred"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```