> ## Documentation Index
> Fetch the complete documentation index at: https://staging-docs.orderly.network/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](https://staging-docs.orderly.network/sdks/hooks/assets/use-collateral.md) - retrieves information about a user's collateral
* [useMaxQty](https://staging-docs.orderly.network/sdks/hooks/assets/use-max-qty.md) - retrieves the maximum quantity a user can place based on the symbol, side, leverage etc.
* [useChain](https://staging-docs.orderly.network/sdks/hooks/assets/use-chain.md) - Chain information
* [useChains](https://staging-docs.orderly.network/sdks/hooks/assets/use-chains.md) - Retrieves the list of supported chains
* [useDeposit](https://staging-docs.orderly.network/sdks/hooks/assets/use-deposit.md) - retrieves a Withdraw tokens from Orderly smart contract balance helper
* [useHoldingStream](https://staging-docs.orderly.network/sdks/hooks/assets/use-holding-stream.md) - Retrieves user's assets

Functions regarding asset calculations are provided by [@orderly.network/perp](https://staging-docs.orderly.network/sdks/perp/overview.md)

## 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]);
};
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.