Grid Order

This section documents the grid_order action

This action is used to create a Grid Order.

  • Grid orders will be placed in a range between the upper and lower price

  • Orders above current price will be sells, and under will be buys


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.

You can whitelist coins allowed for trading in your Bot Settings


is_buy

This parameter indicates the direction bias of the grid.

  • True for long-only positions

  • False for short-only positions

Leave empty for bi-directional grid orders to open both long and short positions


upper_price*

This required parameter indicates the upper price of the gird.

  • A value of 100000 places the last upper grid order at the price 100,000


lower_price*

This required parameter indicates the lower price of the grid.

  • A value of 98000 places the last lower grid order at the price 98,000


num_grids*

This required parameter indicates the total number of grids to create.

  • A value of 5 will create 5 grids (6 orders)


Sizes*

3 size types are available to use: size, size_usd, size_pct.

  • The size in this case represent the Total Size used across all orders.

  • Make sure each orders will be at least $10 of value. (i.e. total size is $100 USD, split across 5 orders, each order will be $20)

size

This parameter indicates a size in contracts.

  • A value of 0.005 is equal to 0.005 BTC

size_usd

This parameter indicates a size in USD.

  • A value of 100 is equal to $100 USD

size_pct

This parameter indicates a size in percentage of available balance.

  • A value of 0.1 is equal to 10%


Take-Profit & Stop-Loss

These parameters allows you to add position take-profit and stop-loss orders.

  • Position TP/SL orders will market-close the entire position when triggered (even if its size has increased)

  • Percentage-based TP/SL are calculated based on entry prices (not ROE %)

sl_pct

This parameter indicates the % from entry to place your stop-loss.

  • A value of 0.01 is equal to a 1% stop-loss

tp_pct

This parameter indicates the % from entry to place your take-profit.

  • A value of 0.01 is equal to a 1% take-profit

sl

This parameter indicates a direct price to place your stop-loss.

tp

This parameter indicates a direct price to place your take-profit.


delay

This parameter indicates a number of seconds to wait before triggering the action.

  • A value of 5 is equal to a 5 seconds delay

  • Max. allowed delay is 10 seconds

Last updated

Was this helpful?