Close All
This section documents the close_all action
Example Request
This example closes all open positions.
{
"action": "close_all",
"bot_id": BOT_ID,
"api_key": "API_KEY"
}is_buy
This parameter indicates the position's direction to close.
Truewill close onlyLongpositionsFalsewill close onlyShortpositions
"is_buy": truecoins
This parameter indicates a list of coins to use for the action.
size_pct
This parameter indicates the position's size percentage to close.
A value of
0.5is equal to50%of every position sizeMax. allowed value is
1(100% of position size)
dexs
This parameter indicates which dexs to use for the action.
e.g targeting the
xyzdex:
e.g targeting both
hyperliquidandxyzdexs:
slippage_pct
This parameter indicates the Max. % slippage allowed for the trade to execute.
A value of
0.05is equal to5%
delay
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
Last updated
Was this helpful?