Max Order Size

Gets the max order size possible of a given product for a given subaccount.

Rate limits

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

See more details in API Rate limits

Request

Connect

WEBSOCKET [GATEWAY_WEBSOCKET_ENDPOINT]

Message

{
  "type": "max_order_size",
  "product_id": 1,
  "sender": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000",
  "price_x18": "23000000000000000000000",
  "direction": "short",
  "spot_leverage": "true"
}

Request Parameters

ParameterTypeRequiredDescription

sender

string

Yes

A bytes32 sent as a hex string; includes the address and the subaccount identifier.

product_id

number

Yes

Id of spot / perp product for which to retrieve max order size.

price_x18

string

Yes

An int128 representing the price of the order multiplied by 1e18, sent as a string. For example, a price of 1 USDC would be sent as "1000000000000000000"

direction

string

Yes

long for max bid or short for max ask.

spot_leverage

string

No

Boolean sent as a string. Indicates whether leverage should be used; when set to false , returns the max order possible without borrow. Defaults to true

Response

{
  "status": "success",
  "data": {
    "max_order_size": "137847520631947079935"
  },
  "request_type": "query_max_order_size",
}

Last updated