> For the complete documentation index, see [llms.txt](https://docs.hyperlink.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperlink.xyz/api/exchange-methods/spotclearinghousestate.md).

# spotClearinghouseState

## POST /exchange

> spotClearinghouseState

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - spotClearinghouseState","version":"1.0.0"},"tags":[{"name":"spotClearinghouseState"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["spotClearinghouseState"],"summary":"spotClearinghouseState","operationId":"exchange_spotClearinghouseState","requestBody":{"description":"Signed `spotClearinghouseState` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/SpotClearinghouseStateRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["spotClearinghouseState"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"SpotClearinghouseStateRequest":{"type":"object","description":"Spot account state request payload with `type: \"spotClearinghouseState\"`."},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hyperlink.xyz/api/exchange-methods/spotclearinghousestate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
