Mizar
Search…
API Trading - TradingView
TradingView webhook commands

Open long position

1
{
2
"api_key": "",
3
"action": "open-position",
4
"strategy_id": "",
5
"base_asset": "BTC",
6
"quote_asset":"USDT",
7
"is_long": "true",
8
"size": "1"
9
}
Copied!
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

1
{
2
"api_key": "",
3
"action": "open-position",
4
"strategy_id": "",
5
"base_asset": "BTC",
6
"quote_asset":"USDT",
7
"is_long": "false",
8
"size": "1"
9
}
Copied!

Close position

1
{
2
"api_key": "",
3
"action": "close-position",
4
"strategy_id": "",
5
"position_id": ""
6
}
Copied!

Close all open positions

1
{
2
"api_key": "",
3
"action": "close-all-positions",
4
"strategy_id": ""
5
}
Copied!
Last modified 1mo ago