Grid Order
This section documents the grid_order action
Example Request
This example will place 11 equal limit orders on BTC between the price of 100,000 and 98,000 using a total size of $150 USD split across each orders.
{
"action": "grid_order",
"coin": "BTC",
"size_usd": 150,
"upper_price": 120000,
"end_price": 100000,
"num_grids": 10,
"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 parameter indicates the direction bias of the grid.
Truefor long-only positionsFalsefor short-only positions
"is_buy": trueupper_price*
This required parameter indicates the upper price of the gird.
A value of
100000places the last upper grid order at the price100,000
"upper_price": 100000lower_price*
This required parameter indicates the lower price of the grid.
A value of
98000places the last lower grid order at the price98,000
"lower_price": 98000num_grids*
This required parameter indicates the total number of grids to create.
A value of
5will create5grids (6 orders)
"num_grids": 5Sizes*
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 a size in percentage of available balance.
A value of
0.1is equal to10%
"size_pct": 0.1Take-Profit & Stop-Loss
These parameters allows you to add position take-profit and stop-loss orders.
Only available when specifying the is_buy parameter
sl_pct
This parameter indicates the % from entry to place your stop-loss.
A value of
0.01is equal to a1% stop-loss
"sl_pct": 0.01tp_pct
This parameter indicates the % from entry to place your take-profit.
A value of
0.01is equal to a1% take-profit
"tp_pct": 0.01sl
This parameter indicates a direct price to place your stop-loss.
"sl": 62500tp
This parameter indicates a direct price to place your take-profit.
"tp": 72500delay
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?