All URIs are relative to https://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
OrderAmend | PUT /order | Amend the quantity or price of an open order. |
OrderAmendBulk | PUT /order/bulk | Amend multiple orders. |
OrderCancel | DELETE /order | Cancel order(s). Send multiple order IDs to cancel in bulk. |
OrderCancelAll | DELETE /order/all | Cancels all of your orders. |
OrderCancelAllAfter | POST /order/cancelAllAfter | Automatically cancel all your orders after a specified timeout. |
OrderClosePosition | POST /order/closePosition | Close a position. [Deprecated, use POST /order with execInst: 'Close'] |
OrderGetOrders | GET /order | Get your orders. |
OrderNew | POST /order | Create a new order. |
OrderNewBulk | POST /order/bulk | Create multiple new orders. |
Order OrderAmend (string orderID = null, string origClOrdID = null, string clOrdID = null, double? simpleOrderQty = null, decimal? orderQty = null, double? simpleLeavesQty = null, decimal? leavesQty = null, double? price = null, double? stopPx = null, double? pegOffsetValue = null, string text = null)
Amend the quantity or price of an open order.
Send an orderID
or origClOrdID
to identify the order you wish to amend. Both order quantity and price can be amended. Only one qty
field can be used to amend. Use the leavesQty
field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. Use the simpleOrderQty
and simpleLeavesQty
fields to specify order size in Bitcoin, rather than contracts. These fields will round up to the nearest contract. Like order placement, amending can be done in bulk. Simply send a request to PUT /api/v1/order/bulk
with a JSON body of the shape: {\"orders\": [{...}, {...}]}
, each object containing the fields used in this endpoint.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderAmendExample
{
public void main()
{
var apiInstance = new OrderApi();
var orderID = orderID_example; // string | Order ID (optional)
var origClOrdID = origClOrdID_example; // string | Client Order ID. See POST /order. (optional)
var clOrdID = clOrdID_example; // string | Optional new Client Order ID, requires `origClOrdID`. (optional)
var simpleOrderQty = 1.2; // double? | Optional order quantity in units of the underlying instrument (i.e. Bitcoin). (optional)
var orderQty = 3.4; // decimal? | Optional order quantity in units of the instrument (i.e. contracts). (optional)
var simpleLeavesQty = 1.2; // double? | Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. (optional)
var leavesQty = 3.4; // decimal? | Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. (optional)
var price = 1.2; // double? | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional)
var stopPx = 1.2; // double? | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. (optional)
var pegOffsetValue = 1.2; // double? | Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. (optional)
var text = text_example; // string | Optional amend annotation. e.g. 'Adjust skew'. (optional)
try
{
// Amend the quantity or price of an open order.
Order result = apiInstance.OrderAmend(orderID, origClOrdID, clOrdID, simpleOrderQty, orderQty, simpleLeavesQty, leavesQty, price, stopPx, pegOffsetValue, text);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderAmend: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
orderID | string | Order ID | [optional] |
origClOrdID | string | Client Order ID. See POST /order. | [optional] |
clOrdID | string | Optional new Client Order ID, requires `origClOrdID`. | [optional] |
simpleOrderQty | double? | Optional order quantity in units of the underlying instrument (i.e. Bitcoin). | [optional] |
orderQty | decimal? | Optional order quantity in units of the instrument (i.e. contracts). | [optional] |
simpleLeavesQty | double? | Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. | [optional] |
leavesQty | decimal? | Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. | [optional] |
price | double? | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] |
stopPx | double? | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. | [optional] |
pegOffsetValue | double? | Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. | [optional] |
text | string | Optional amend annotation. e.g. 'Adjust skew'. | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List OrderAmendBulk (string orders = null)
Amend multiple orders.
Similar to POST /amend, but with multiple orders. application/json
only. Ratelimited at 50%.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderAmendBulkExample
{
public void main()
{
var apiInstance = new OrderApi();
var orders = orders_example; // string | An array of orders. (optional)
try
{
// Amend multiple orders.
List<Order> result = apiInstance.OrderAmendBulk(orders);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderAmendBulk: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
orders | string | An array of orders. | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List OrderCancel (string orderID = null, string clOrdID = null, string text = null)
Cancel order(s). Send multiple order IDs to cancel in bulk.
Either an orderID or a clOrdID must be provided.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderCancelExample
{
public void main()
{
var apiInstance = new OrderApi();
var orderID = orderID_example; // string | Order ID(s). (optional)
var clOrdID = clOrdID_example; // string | Client Order ID(s). See POST /order. (optional)
var text = text_example; // string | Optional cancellation annotation. e.g. 'Spread Exceeded'. (optional)
try
{
// Cancel order(s). Send multiple order IDs to cancel in bulk.
List<Order> result = apiInstance.OrderCancel(orderID, clOrdID, text);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderCancel: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
orderID | string | Order ID(s). | [optional] |
clOrdID | string | Client Order ID(s). See POST /order. | [optional] |
text | string | Optional cancellation annotation. e.g. 'Spread Exceeded'. | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object OrderCancelAll (string symbol = null, string filter = null, string text = null)
Cancels all of your orders.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderCancelAllExample
{
public void main()
{
var apiInstance = new OrderApi();
var symbol = symbol_example; // string | Optional symbol. If provided, only cancels orders for that symbol. (optional)
var filter = filter_example; // string | Optional filter for cancellation. Use to only cancel some orders, e.g. `{\"side\": \"Buy\"}`. (optional)
var text = text_example; // string | Optional cancellation annotation. e.g. 'Spread Exceeded' (optional)
try
{
// Cancels all of your orders.
Object result = apiInstance.OrderCancelAll(symbol, filter, text);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderCancelAll: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | string | Optional symbol. If provided, only cancels orders for that symbol. | [optional] |
filter | string | Optional filter for cancellation. Use to only cancel some orders, e.g. `{"side": "Buy"}`. | [optional] |
text | string | Optional cancellation annotation. e.g. 'Spread Exceeded' | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object OrderCancelAllAfter (double? timeout)
Automatically cancel all your orders after a specified timeout.
Useful as a dead-man's switch to ensure your orders are canceled in case of an outage. If called repeatedly, the existing offset will be canceled and a new one will be inserted in its place. Example usage: call this route at 15s intervals with an offset of 60000 (60s). If this route is not called within 60 seconds, all your orders will be automatically canceled. This is also available via WebSocket.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderCancelAllAfterExample
{
public void main()
{
var apiInstance = new OrderApi();
var timeout = 1.2; // double? | Timeout in ms. Set to 0 to cancel this timer.
try
{
// Automatically cancel all your orders after a specified timeout.
Object result = apiInstance.OrderCancelAllAfter(timeout);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderCancelAllAfter: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
timeout | double? | Timeout in ms. Set to 0 to cancel this timer. |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Order OrderClosePosition (string symbol, double? price = null)
Close a position. [Deprecated, use POST /order with execInst: 'Close']
If no price
is specified, a market order will be submitted to close the whole of your position. This will also close all other open orders in this symbol.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderClosePositionExample
{
public void main()
{
var apiInstance = new OrderApi();
var symbol = symbol_example; // string | Symbol of position to close.
var price = 1.2; // double? | Optional limit price. (optional)
try
{
// Close a position. [Deprecated, use POST /order with execInst: 'Close']
Order result = apiInstance.OrderClosePosition(symbol, price);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderClosePosition: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | string | Symbol of position to close. | |
price | double? | Optional limit price. | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List OrderGetOrders (string symbol = null, string filter = null, string columns = null, decimal? count = null, decimal? start = null, bool? reverse = null, DateTime? startTime = null, DateTime? endTime = null)
Get your orders.
To get open orders only, send {"open": true} in the filter param. See <a href="http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_D_68.html\">the FIX Spec for explanations of these fields.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderGetOrdersExample
{
public void main()
{
var apiInstance = new OrderApi();
var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional)
var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#timestamp-filters) for more details. (optional)
var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional)
var count = 3.4; // decimal? | Number of results to fetch. (optional) (default to 100)
var start = 3.4; // decimal? | Starting point for results. (optional) (default to 0)
var reverse = true; // bool? | If true, will sort results newest first. (optional) (default to false)
var startTime = 2013-10-20; // DateTime? | Starting date filter for results. (optional)
var endTime = 2013-10-20; // DateTime? | Ending date filter for results. (optional)
try
{
// Get your orders.
List<Order> result = apiInstance.OrderGetOrders(symbol, filter, columns, count, start, reverse, startTime, endTime);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderGetOrders: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] |
filter | string | Generic table filter. Send JSON key/value pairs, such as `{"key": "value"}`. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. | [optional] |
columns | string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] |
count | decimal? | Number of results to fetch. | [optional] [default to 100] |
start | decimal? | Starting point for results. | [optional] [default to 0] |
reverse | bool? | If true, will sort results newest first. | [optional] [default to false] |
startTime | DateTime? | Starting date filter for results. | [optional] |
endTime | DateTime? | Ending date filter for results. | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Order OrderNew (string symbol, string side = null, double? simpleOrderQty = null, decimal? quantity = null, decimal? orderQty = null, double? price = null, decimal? displayQty = null, double? stopPrice = null, double? stopPx = null, string clOrdID = null, string clOrdLinkID = null, double? pegOffsetValue = null, string pegPriceType = null, string type = null, string ordType = null, string timeInForce = null, string execInst = null, string contingencyType = null, string text = null)
Create a new order.
This endpoint is used for placing orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. If no order type is provided, BitMEX will assume 'Limit'. Be very careful with 'Market' and 'Stop' orders as you may be filled at an unfavourable price. You can submit bulk orders by POSTing an array of orders to /api/v1/order/bulk
. Send a JSON payload with the shape: {\"orders\": [{...}, {...}]}
, with each inner object containing the same fields that would be sent to this endpoint. A note on API tools: if you want to keep track of order IDs yourself, set a unique clOrdID per order. This clOrdID will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. To generate a clOrdID, consider setting a prefix, and incrementing a counter or generating a UUID. Some UUIDs are longer than 36 characters, so use a url-safe base64 encoding. For example, the prefix 'bmex_mm_'
and the UUID '7fbd6545-bb0c-11e4-a273-6003088a7c04'
creates 'bmex_mm_f71lRbsMEeSic2ADCIp8BA'
. See the BitMEX Reference Market Maker for an example of how to use and generate clOrdIDs.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderNewExample
{
public void main()
{
var apiInstance = new OrderApi();
var symbol = symbol_example; // string | Instrument symbol. e.g. 'XBT24H'.
var side = side_example; // string | Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. (optional)
var simpleOrderQty = 1.2; // double? | Order quantity in units of the underlying instrument (i.e. Bitcoin). (optional)
var quantity = 3.4; // decimal? | Deprecated: use `orderQty`. (optional)
var orderQty = 3.4; // decimal? | Order quantity in units of the instrument (i.e. contracts). (optional)
var price = 1.2; // double? | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional)
var displayQty = 3.4; // decimal? | Optional quantity to display in the book. Use 0 for a hidden order. (optional)
var stopPrice = 1.2; // double? | Deprecated: use `stopPx`. (optional)
var stopPx = 1.2; // double? | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. (optional)
var clOrdID = clOrdID_example; // string | Optional Client Order ID. This clOrdID will come back on the order and any related executions. (optional)
var clOrdLinkID = clOrdLinkID_example; // string | Optional Client Order Link ID for contingent orders. (optional)
var pegOffsetValue = 1.2; // double? | Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. (optional)
var pegPriceType = pegPriceType_example; // string | Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg, TrailingStopPeg. (optional)
var type = type_example; // string | Deprecated: use `ordType`. (optional)
var ordType = ordType_example; // string | Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. (optional) (default to Limit)
var timeInForce = timeInForce_example; // string | Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. (optional)
var execInst = execInst_example; // string | Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. (optional)
var contingencyType = contingencyType_example; // string | Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. (optional)
var text = text_example; // string | Optional order annotation. e.g. 'Take profit'. (optional)
try
{
// Create a new order.
Order result = apiInstance.OrderNew(symbol, side, simpleOrderQty, quantity, orderQty, price, displayQty, stopPrice, stopPx, clOrdID, clOrdLinkID, pegOffsetValue, pegPriceType, type, ordType, timeInForce, execInst, contingencyType, text);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderNew: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | string | Instrument symbol. e.g. 'XBT24H'. | |
side | string | Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. | [optional] |
simpleOrderQty | double? | Order quantity in units of the underlying instrument (i.e. Bitcoin). | [optional] |
quantity | decimal? | Deprecated: use `orderQty`. | [optional] |
orderQty | decimal? | Order quantity in units of the instrument (i.e. contracts). | [optional] |
price | double? | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] |
displayQty | decimal? | Optional quantity to display in the book. Use 0 for a hidden order. | [optional] |
stopPrice | double? | Deprecated: use `stopPx`. | [optional] |
stopPx | double? | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. | [optional] |
clOrdID | string | Optional Client Order ID. This clOrdID will come back on the order and any related executions. | [optional] |
clOrdLinkID | string | Optional Client Order Link ID for contingent orders. | [optional] |
pegOffsetValue | double? | Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. | [optional] |
pegPriceType | string | Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg, TrailingStopPeg. | [optional] |
type | string | Deprecated: use `ordType`. | [optional] |
ordType | string | Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. | [optional] [default to Limit] |
timeInForce | string | Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. | [optional] |
execInst | string | Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. | [optional] |
contingencyType | string | Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. | [optional] |
text | string | Optional order annotation. e.g. 'Take profit'. | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List OrderNewBulk (string orders = null)
Create multiple new orders.
This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at ceil(0.5 * orders)
. Submitting 10 orders via a bulk order call will only count as 5 requests. For now, only application/json
is supported on this endpoint.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class OrderNewBulkExample
{
public void main()
{
var apiInstance = new OrderApi();
var orders = orders_example; // string | An array of orders. (optional)
try
{
// Create multiple new orders.
List<Order> result = apiInstance.OrderNewBulk(orders);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling OrderApi.OrderNewBulk: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
orders | string | An array of orders. | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]