# spotState

## Subscribe to spotState

> Subscription to spot state events for a specific user.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid Subscription - spotState","version":"1.0.0"},"tags":[{"name":"spotState"}],"servers":[{"url":"wss://api.hyperliquid.xyz/ws","description":"Mainnet WebSocket"},{"url":"wss://api.hyperliquid-testnet.xyz/ws","description":"Testnet WebSocket"}],"paths":{"/":{"post":{"tags":["spotState"],"summary":"Subscribe to spotState","description":"Subscription to spot state events for a specific user.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of subscription.","enum":["spotState"]},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."},"ignorePortfolioMargin":{"type":"boolean","description":"Whether to ignore portfolio margin calculations."}},"required":["type","user"],"description":"Subscription to spot state events for a specific user."}}},"required":true},"responses":{"200":{"description":"Event of user spot state.","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."},"spotState":{"type":"object","properties":{"balances":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"token":{"type":"integer","minimum":0,"description":"Unique identifier for the token."},"total":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total balance."},"hold":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount on hold."},"entryNtl":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Entry notional value."}},"required":["coin","token","total","hold","entryNtl"],"description":"Balance for a specific spot token."},"description":"Balance for each token."},"evmEscrows":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"token":{"type":"integer","minimum":0,"description":"Unique identifier for the token."},"total":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total balance."}},"required":["coin","token","total"],"description":"Escrowed balance for a specific asset."},"description":"Escrowed balances."}},"required":["balances"],"description":"Account summary for spot trading."}},"required":["user","spotState"],"description":"Event of user spot state."}}}}}}}}}
```
