Close Position
This section documents the close_position action
Example Request
This example partially closes a long position
on BTC
using 50%
of the current position size.
coin*
This required parameter indicates which coin to use for the action.
is_buy
This parameter indicates the direction to close the trade.
True
will close a Long positionFalse
will close a Short position
Sizes
size
This parameter indicates a size in contracts to use for the trade.
A value of
0.005
is equal to0.005 BTC
(requested coin)
size_usd
This parameter indicates a size in USD to use for the trade
A value of
100
is equal to$100 USD
size_pct
This parameter indicates a size % of the current position to use when closing an order
A value of
0.1
is equal to10% of current position size
Max. allowed value is
1
(100% of current position size)
slippage_pct
This parameter indicates the Max. % slippage allowed for the trade to execute.
A value of
0.05
is equal to5%
delay
This parameter indicates a number of seconds to wait before triggering the action
A value of
5
is equal to a5 seconds
delayMax. allowed delay is
10 seconds
Last updated
Was this helpful?