C-Mizar Manual
Search
K

TRADINGVIEW WEBHOOK

Manage your positions and bot from TradingView
Before starting to send signals, ensure you have generated a Mizar API Key. Learn how to do this by reading the instructions here.
Set your TradingView Webhook endpoint to: https://api.mizar.com/api/v1/trading-view/execute-command

Open long position

{
"api_key": "",
"action": "open-position",
"strategy_id": "",
"base_asset": "BTC",
"quote_asset":"USDT",
"is_long": "true",
"size": "1"
}
size indicates the relative size of the position. If you are sure that the position will bring profit use 1, otherwise scale down the size to reduce risks.

Open short position

{
"api_key": "",
"action": "open-position",
"strategy_id": "",
"base_asset": "BTC",
"quote_asset":"USDT",
"is_long": "false",
"size": "1"
}

Close position

{
"api_key": "",
"action": "close-position",
"strategy_id": "",
"position_id": ""
}

Close all open positions

{
"api_key": "",
"action": "close-all-positions",
"strategy_id": "",
"is_long": "true"
}

Close all open positions for a specific pair

{
"api_key": "",
"action": "close-all-positions",
"strategy_id": "",
"base_asset": "",
"quote_asset": "",
"is_long": "true"
}