API Trading - TradingView

TradingView webhook commands

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

Last updated