Mizar
  • Whitepaper
    • Abstract
    • C-Mizar
      • Problem
      • Solution
      • Opportunity
      • Product
        • Marketplace
        • DCA Bots
        • API Bots
        • Smart Trading
        • Paper Trading
        • Portfolio Manager
    • D-Mizar
      • Problem
      • Solution
      • Opportunity
      • Product
        • Contract Sniffer
        • Sniper Bot
    • $MZR Token
      • Use Cases
      • Token Metrics
      • Vesting Schedule and Release
      • FAQ
    • Roadmap
      • Supersonic Phase (C-Phase)
      • Hypersonic Phase (D-Phase)
    • Team
  • SDK
    • DCA Bots
      • DCA Bot SDK
      • DCA Bot - TradingView
    • API Bots
      • API Trading SDK
      • API Trading - TradingView
  • Mizar AI (on hold)
    • Mizar AI (on hold)
    • Data Sources
    • Model
      • Downsampling with CUSUM Filter
      • Average Uniqueness
      • Sample Weights
      • Sequentially Bootstrapped Bagging Classifier
      • Metalabeling
      • Bet Sizing
      • Combinatorial Purged Cross Validation
    • Structural Breaks
    • Transformations
      • Labeling Methods
      • Technical Analysis Features
      • Microstructural Features
    • Strategy Backtesting
    • Strategy Deployment
Powered by GitBook
On this page
  • Open long position
  • Open short position
  • Close position
  • Close all open positions
  • Close all open positions for a specific pair

Was this helpful?

  1. SDK
  2. API Bots

API Trading - TradingView

TradingView webhook commands

PreviousAPI Trading SDKNextMizar AI (on hold)

Last updated 1 year ago

Was this helpful?

Endpoint:

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"
}
https://api.mizar.com/api/v1/trading-view/execute-command