> ## Documentation Index
> Fetch the complete documentation index at: https://orderly.network/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Assets

> Handle collateral, deposits, withdrawals, and balances with Orderly asset hooks.

`@orderly.network/hooks` provides the following hooks to get data regarding a user's assets. This can be used under different use cases.

* [useCollateral](/sdks/hooks/assets/use-collateral) - retrieves information about a user's collateral
* [useMaxQty](/sdks/hooks/assets/use-max-qty) - retrieves the maximum quantity a user can place based on the symbol, side, leverage etc.
* [useChain](/sdks/hooks/assets/use-chain) - Chain information
* [useChains](/sdks/hooks/assets/use-chains) - Retrieves the list of supported chains
* [useDeposit](/sdks/hooks/assets/use-deposit) - retrieves a Withdraw tokens from Orderly smart contract balance helper
* [useHoldingStream](/sdks/hooks/assets/use-holding-stream) - Retrieves user's assets

Functions regarding asset calculations are provided by [@orderly.network/perp](/sdks/perp/overview)

## Deposit status

Subscribe to the relevant websocket topic to get updates on the deposit status.

```typescript theme={null}
import { useWS } from "@orderly.network/hooks";

//...

export const Example = () => {
  const ws = useWS();

  useEffect(() => {
    const unsubscribe = ws.subscribe(
      {
        id: "wallet",
        event: "subscribe",
        topic: "wallet",
        ts: Date.now()
      },
      {
        onMessage: (data: any) => {
          //
        }
      }
    );

    return () => {
      unsubscribe();
    };
  }, [ws]);
};
```

### Withdrawal status

Subscribe to the relevant websocket topic to get updates on the withdrawal status.

```typescript theme={null}
import { useWS } from "@orderly.network/hooks";

//...

export const Example = () => {
  const ws = useWS();

  useEffect(() => {
    const unsubscribe = ws.subscribe(
      {
        id: "wallet",
        event: "subscribe",
        topic: "wallet",
        ts: Date.now()
      },
      {
        onMessage: (data: any) => {
          //
        }
      }
    );

    return () => {
      unsubscribe();
    };
  }, [ws]);
};
```
