Order will be triggered immediately with a Market Order
This action can be used for both opening and closing positions (including adding/reducing size)
Positions direction switch is not handled automatically (like in Open Position), but can be achieved manually by specifying a larger opposite size than the current position size.
Example Request
This example opens a long position on BTC using a size of $100 USD, with 1% stop-loss and 2% take-profit
This example closes a long position on BTC using a size of $100 USD
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 required parameter indicates the direction of the trade.
True can open a Long position or close a Short position
False can open a Short position or close a Long position
reduce_only*
This required parameter indicates whether the order is allowed to only reduce position size or not.
This parameter is only available for Perps.
A value of true will only allow closing/reducing position
A value of false will allow both opening and closing position
Sizes*
3 size types are available to use: size, size_pct, size_usd.
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 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.1 is equal to 10%
When opening an order (reduce_only=false), a size_pct of 0.1 means 10% of available account balance.
When closing an order (reduce_only=true), a size_pct of 0.1 means 10% of current position size.
Take-Profit & Stop-Loss
These parameters allows you to add single take-profit and stop-loss orders.
This parameter is only available for Perps.
Single TP/SL orders will market-close a percentage of the current order size
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.
slippage_pct
This parameter indicates the Max. % slippage allowed for the trade to execute.
A value of 0.05 is equal to 5%
Defaults to 5% when not specified
delay
This parameter indicates a number of seconds to wait before triggering the action.