Mizar
Search…
API Trading - TradingView
TradingView webhook commands

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": ""
}

Close all open positions for a specific pair

{
"api_key": "",
"action": "close-all-positions",
"strategy_id": "",
"base_asset": "",
"quote_asset": ""
}
Copy link
Outline
Open long position
Open short position
Close position
Close all open positions
Close all open positions for a specific pair