Scale Order
This section documents the scale_order action
Example Request
This example will place 5 equal limit orders to open a long position on BTC between the price of 100,000 and 98,000 using a total size of $100 USD
{
"action": "scale_order",
"coin": "BTC",
"is_buy": true,
"size_usd": 100,
"start_price": 100000,
"end_price": 98000,
"num_orders": 5,
"skew": 1,
"reduce_only": false,
"bot_id": BOT_ID,
"api_key": "API_KEY"
}This example will place 3 equal limit orders to close a long position on BTC between the price of 105,000 and 106,000 using 100% of current position size
{
"action": "stop_market_order",
"coin": "BTC",
"is_buy": false,
"size_pct": 1,
"start_price": 105000,
"end_price": 106000,
"num_orders": 3,
"skew": 1,
"reduce_only": true,
"bot_id": BOT_ID,
"api_key": "API_KEY"
}coin*
This required parameter indicates which coin to use for the action.
"coin": "BTC"is_buy*
This required parameter indicates the direction of the trade.
Truecan open a Long position or close a Short positionFalsecan open a Short position or close a Long position
"is_buy": truereduce_only*
This parameter is only available for Perps.
This required parameter indicates whether an order should only be used to close an existing position (true) or for both opening and closing/reducing positions. (false)
A value of
truewill only allow closing/reducing positionA value of
falsewill allow both opening and closing position
"reduce_ony": truestart_price*
This required parameter indicates the price to place the first limit order. (closest to the current price)
A value of
100000places the first limit order at the price100,000
"start_price": 100000end_price*
This required parameter indicates the price to place the last limit order. (farthest from current price)
A value of
98000places the last limit order at the price98,000
"start_price": 98000num_orders*
This required parameter indicates the total number of limit orders to place.
A value of
5will place5different limit orders
"num_orders": 5skew
This parameter indicates the size difference between the first and last limit order.
A value of 2 will make the
lastorder size twice as large as thefirstorderA value of 0.5 will make the
firstorder size twice as large as thelastorder
"skew": 2Sizes
size
This parameter indicates a size in contracts.
A value of
0.005is equal to0.005 BTC
"size": 0.005size_usd
This parameter indicates a size in USD.
A value of
100is equal to$100 USD
"size_usd": 100size_pct
This parameter indicates either a size in percentage of available balance when opening an order, or a size in percentage of current position when closing an order.
A value of
0.1is equal to10%
"size_pct": 0.1delay
This parameter indicates a number of seconds to wait before triggering the action.
A value of
5is equal to a5 secondsdelayMax. allowed delay is
10 seconds
"delay": 5Last updated
Was this helpful?