Files

2.2 KiB

Max Withdrawable

Rate limits

  • 480 requests/min or 80 requests every 10 seconds per IP address. (weight = 5)

{% hint style="info" %} See more details in API Rate limits {% endhint %}

Request

{% tabs %} {% tab title="Websocket" %} Connect

WEBSOCKET [GATEWAY_WEBSOCKET_ENDPOINT]

Message

{
  "type": "max_withdrawable",
  "product_id": 1,
  "sender": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000",
  "spot_leverage": "true"
}

{% endtab %}

{% tab title="REST (GET)" %} GET [GATEWAY_REST_ENDPOINT]/query?type=max_withdrawable&product_id={product_id}&sender={sender} {% endtab %}

{% tab title="REST (POST)" %} POST [GATEWAY_REST_ENDPOINT]/query

Message

{
  "type": "max_withdrawable",
  "product_id": 1,
  "sender": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000",
  "spot_leverage": "true"
}

{% endtab %} {% endtabs %}

Request Parameters

ParameterTypeRequiredDescription
senderstringYesA bytes32 sent as a hex string; includes the address and the subaccount identifier.
product_idnumberYesId of spot / perp product for which to retrieve max withdrawable amount.
spot_leveragestringNoBoolean sent as a string. Indicates whether leverage should be used; when set to false , returns the max withdrawable amount possible without borrow. Defaults to true

Response

{
  "status": "success",
  "data": {
    "max_withdrawable": "7968557932297078268650"
  },
  "request_type": "query_max_withdrawable",
}