DCA Bot - TradingView
TradingView webhook commands
Endpoint: https://api.mizar.com/api/v1/dca-bots/trading-view/execute-command
Open position
Open position with take profits and stop loss set with the bot values
{
"bot_id": "1",
"action": "open-position",
"base_asset": "BTC",
"quote_asset": "USDT",
"api_key": "<API KEY>"
}Open position with take profit set to 5%
{
"bot_id": "1",
"action": "open-position",
"base_asset": "BTC",
"quote_asset": "USDT",
"take_profit_pct": "0.05",
"api_key": "<API KEY>"
}Open position with stop loss set to 5%
Open long position for a bidirectional bot
Open short position for a bidirectional bot
Open position at fixed price with an expiration expressed in seconds
Add funds
The size is relative to the base order size and can be larger than 1 (e.g. if size is 1 and base order size of the subscription is 10 USDT then the add funds will be of 10 USDT).
Add funds with limit order
Cancel add funds orders
Cancel all the active add funds orders
Remove funds
Remove funds will reduce the position size The size can be expressed with: size: relative to base order order size position_size: relative to the total position size
Remove funds with limit order
Remove 20% of the total position size
Cancel remove funds orders
Cancel all the active remove funds orders
Edit take profit relative
Edit take profit for existing position to 5%
Edit take profit for existing long position to 5%
Edit take profit for existing short position to 5%
Edit take profit absolute
Edit take profit using absolute value. If a safety order is hit after the take profit is edited, the take profit will be updated based on the position settings.
Edit stop loss
Edit stop loss for existing position to 5%
Edit stop loss for existing long position to 5%
Edit stop loss for existing short position to 5%
Close position
Close long position
Close short position
Shift safety orders
Shift first safety order to be at 2500
Execute the first available safety order as a market order
For a long/short DCA bot (bidirectional) the argument side must be included as in the example below
Close all positions
Stop bot and close all positions
Last updated
Was this helpful?