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. |