MT5-TradingToolCrypto icon indicating copy to clipboard operation
MT5-TradingToolCrypto copied to clipboard

Bybit v5 API

Open TradingToolCrypto opened this issue 1 year ago • 2 comments

Bybit has 4 types 👍 These market types are

  • inverse
  • linear
  • spot
  • options

Enter the market type into the robot under API KEYS where it says LiveDemo :

  • TestNet is no longer working from my experience (bybit website doesn't allow api key creation)

Wallets

Unified api has two wallets : Unified and Contract ( inverse perps: which is the Crypto Base Asset markets such as BTCUSD ETHUSD, etc). The data is returned to the user via GlobalVariables (mt5 platform local storage)

Unified

  • GlobalVarible : Bybit

Contract

  • GlobalVariable : Bybit_C

Charts

  • spot market suffix : byb
  • linear markets suffix : byl
  • inverse markets suffix : byi

If any charts are created for Bybit, the returning exchangeNumber = 2 ( unified api v5)

TradingToolCrypto avatar Mar 21 '24 17:03 TradingToolCrypto

Robot: CB_Charts supports Bybit spot market by default.

  • exchange number: 2
  • exchange name : bybit

TradingToolCrypto avatar Apr 10 '24 19:04 TradingToolCrypto

Available functions : https://github.com/TradingToolCrypto/MT5-TradingToolCrypto/blob/8eedab4a07aad1def69f857cb9c4c6a6a16a3c1a/MQL5/Include/TradingToolCrypto/CBP/CryptoBridgeProClass.mqh#L159

todo

conditional orders:

    • modify trade_conditional
    • cancel_trade_stop
    • open_trade_stop
    • open_trade_stopLimit

v5

How to create conditional order:

  • use the exist endpoint and pass another params : triggerPrice

When submitting an order, if triggerPrice is set, the order will be automatically converted into a conditional order. In addition, the conditional order does not occupy the margin. If the margin is insufficient after the conditional order is triggered, the order will be cancelled.

sl , tp (not supported)

Note: The TP/SL of Spot Trading is different from that of Perpetual and Futures Contracts.

https://bybit-exchange.github.io/docs/v5/order/create-order

TradingToolCrypto avatar Apr 10 '24 19:04 TradingToolCrypto