BitMEX Trading API
- Kütüphaneler
- Romeu Bertho
- Sürüm: 1.0
- Etkinleştirmeler: 5
Cryptocurrency analysis has never been easier with Crypto Charts for MetaTrader 5.
Now, trading on BitMEX has never been easier with BitMEX Trading API for MetaTrader 5.
BitMEX Trading API library was built to be as easy to use as possible. Just include the library into your Expert Advisor or Script, call the corresponding methods and start trading!
Features
Trade on BitMEX and BitMEX Testnet.
Build and automate your strategies.
Concern more with the trading strategy logic and less with the code.
Automate your alerts and don't lose trading opportunities anymore!
Create custom Trade Pads for manual trading.
Build Hybrid strategies by mixing manual and automated trading.
Code whatever you want by using MQL5 language + BitMEX Trading API.
Create your strategy, go for BitMEX Testnet, then move for real trading!
Getting Started
All the required files and example codes can be found in the CodeBase. To use BitMEX Trading API and run all the example codes, you must download all the files and install them in their corresponding folders.Methods | Description |
---|---|
void SetAccount(string apiKey, string apiSecret, bool testnet) | Set your BitMEX account to trade. By default, API Keys can only read basic user data, such as positions, margin, orders, and executions. They cannot submit orders or withdraw.If you wish to execute orders with your API Key, you must add the "order" permission upon creation. |
bool Order(ENUM_BITMEX_REST_METHOD method, MqlBitmexOrderRequest &request, MqlBitmexOrderResult &result[]) | Create a new order, get pending orders and order history, amend the quantity or price of a pending order, cancel orders. |
bool OrderBulk(ENUM_BITMEX_REST_METHOD method, MqlBitmexOrderRequest &request[], MqlBitmexOrderResult &result[]) | Create and amend multiple orders for the same symbol. |
bool OrderCancelAllAfter(ENUM_BITMEX_REST_METHOD method, MqlBitmexOrderRequest &request, MqlBitmexOrderResult &result[]) | Automatically cancel all your orders after a specified timeout. |
bool OrderAll(ENUM_BITMEX_REST_METHOD method, MqlBitmexOrderRequest &request, MqlBitmexOrderResult &result[]) | Cancel all of your orders. |
bool Position(ENUM_BITMEX_REST_METHOD method, MqlBitmexPositionRequest &request, MqlBitmexPositionResult &result[]) | Get your position status. |
bool PositionIsolate(string symbol, bool enabled, MqlBitmexPositionResult &result[]) | Enable isolate margin or cross margin per-position. |
bool PositionLeverage(string symbol, double leverage, MqlBitmexPositionResult &result[]) | Choose leverage for a position. |
bool PositionRiskLimit(string symbol, double riskLimit, MqlBitmexPositionResult &result[]) | Update your risk limit. |
bool PositionTransferMargin(string symbol, double amount, MqlBitmexPositionResult &result[]) | Transfer equity in or out of a position. |
bool UserMargin(string currency, MqlBitmexUserMarginResult &result[]) | Get your account's margin status. |
bool Execution(MqlBitmexExecutionRequest &request, MqlBitmexExecutionResult &result[]) | Get all raw executions for your account. |
bool OrderBook(string symbol, int depth, MqlBookInfo &orderBook[]); | Get level 2 orderbook data. |
bool IntrumentCompositeIndex(MqlBitmexInstrumentRequest &request, MqlBitmexInstrumentCompositeIndex &result[]); | Show constituent parts of an index. |
void GetRateLimit(int &limit, int &remaining, long &reset); | Get the rate limit of your BitMEX account. Requests to BitMEX servers are rate limited to 60 requests per 1 minute. This counter refills continuously. |
void GetError(int &statusCode, string &name, string &message); | Get the error of the last request made to BitMEX servers. If a large number of 4xx or 5xx responses are delivered in a short period of time, your IP may be banned for an hour from BitMEX servers. Multiple bans in a short time will result in a week ban. |
Excellent experience so far. Thanks Romeu!
Additional Updates