# Withdraw Collateral {% hint style="info" %} **Note**: use the [max withdrawable](https://docs.nado.xyz/developer-resources/api/gateway/queries/max-withdrawable) query to determine the max amount you can withdraw for a given spot product. {% endhint %} ## Rate limits * With spot leverage: 60 withdrawals/min or 10 withdrawals every 10 seconds per wallet. (**weight = 10**) * Without spot leverage: 30 withdrawals/min or 5 withdrawals every 10 seconds per wallet. (**weight=20**) {% hint style="info" %} See more details in [API Rate limits](https://docs.nado.xyz/developer-resources/api/rate-limits). {% endhint %} ## Request {% tabs %} {% tab title="Websocket" %} **Connect** `WEBSOCKET [GATEWAY_WEBSOCKET_ENDPOINT]` **Message** ```json { "withdraw_collateral": { "tx": { "sender": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43746573743000000000000000", "productId": 1, "amount": "1000000000000000000", "nonce": "1" }, "signature": "0x" } } ``` {% endtab %} {% tab title="REST" %} `POST [GATEWAY_REST_ENDPOINT]/execute` **Body** ```json { "withdraw_collateral": { "tx": { "sender": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43746573743000000000000000", "productId": 1, "amount": "1000000000000000000", "nonce": "1" }, "signature": "0x" } } ``` {% endtab %} {% endtabs %} ## Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| tx | object | Yes | Withdraw collateral transaction object. See Signing section for details on the transaction fields. |
| tx.sender | string | Yes | Hex string representing the subaccount's 32 bytes (address + subaccount name) of the tx sender. |
| tx.productId | number | Yes | A spot product ID to withdraw from. |
| tx.amount | string | Yes | The amount of the asset to withdraw, denominated in the base ERC20 token of the specified product e.g: USDT0 (product=0) has 6 decimals whereas wETH (product=3) has 18. See Signing section for more details. |
| tx.nonce | string | Yes | This is an incrementing nonce, can be obtained using the Nonces query. |
| signature | string | Yes | Hex string representing hash of the signed transaction. See Signing section for more details. |
| spot_leverage | boolean | No | Indicates whether leverage should be used; when set to false , the withdrawal fails if the transaction causes a borrow on the subaccount. Defaults to true. |