cancelAllOrders
Mutation — returns list[BatchCancelOrdersResult].
Cancel of all open orders of an account.
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
geoLocation | GeoLocationCode | No | — |
deviceInfo | DeviceInfo | No | — |
cancelOrder
Mutation — returns CancelOrderResult.
Cancels an order.
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
orderId | rID! | Yes | The id of the order that the user wishes to cancel. |
geoLocation | GeoLocationCode | No | — |
deviceInfo | DeviceInfo | No | — |
cancelOrders
Mutation — returns list[BatchCancelOrdersResult].
Batch cancel of orders.
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
orderIds | [rID] | No | The list of the ids of the orders that the user wishes to cancel. |
geoLocation | GeoLocationCode | No | — |
deviceInfo | DeviceInfo | No | — |
confirmOrder
Mutation — returns OrderResult.
Creates a new order.
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
userOrder | UserOrder! | Yes | The data structure holding the details for the order to be placed. |
geoLocation | GeoLocationCode | No | — |
deviceInfo | DeviceInfo | No | — |
confirmOrders
Mutation — returns OrderResults.
Creates a set of new orders.
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
userOrders | [UserOrder!]! | Yes | The data structure holding the details for the orders to be placed. |
geoLocation | GeoLocationCode | No | — |
deviceInfo | DeviceInfo | No | — |
myOrderHistory
Query — returns OrdersWithCount.
List of all orders for a user, all criteria is combined in an AND.
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
orderIds | [rID] | No | The ids of the orders to return |
clientOrderIds | [String] | No | The client order ids of the orders to return. |
marketIds | [rID] | No | The id of the market to restrict the orders returned to. |
status | OrderStatus | No | Order status filter |
pagination | Pagination | No | The pagination to use for the results. |
sortBy | OrdersSortBy | No | The sorting to use for the results. |
mySettlementsHistory
Query — returns NetSettlementHistory.
History of all settlements
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
pagination | Pagination | No | The pagination to use for the results. |
filter | SettlementsFilter | No | Optional filter for returned settlements. |
myTradesForOrder
Query — returns list[Trade].
List of trades associated with provided order id
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
orderId | rID! | Yes | The id of the order to find the trades for. |
myTradesHistory
Query — returns TradesWithCount.
List of the user’s trades
Parameters
| Name | GraphQL type | Required | Description |
|---|---|---|---|
sortBy | TradesSortBy | No | How to sort the results of the query. |
filter | MarketIdsFilter | No | A filter for market ids to include. |
settlementType | TradeSettlementType | No | A filter for trades. |
settledOn | DateRangeFilter | No | Date Range filter to find settled trades. |
pagination | Pagination | No | The pagination to use for the results. |
placeOddsOrder
Mutation — returns OrderResult.
Place Limit Order with Odds and Amount
This mutation creates a limit order with specified odds and amount. The odds are converted into a price, and the order quantity is calculated by dividing the specified amount by the calculated price.Calculation Formulas
For buy orders:
Decimalodds:round(max_price_in_cents / odds)Americanpositive odds:round(max_price_in_cents / (odds + 100) * 100)Americannegative odds:round((max_price_in_cents / 100) * odds / (odds - 100) * 100)
For sell orders:
The price is calculated as max_price_in_cents - price_for_a_buy_order.
Parameters
odds: The odds value, such as1.7or+120or-200.max_price_in_cents: The closing market price in case of a win result.
Rounding
Rounding is performed using thehalf_up algorithm. If the price is rounded to 0 or max_price_in_cents, the request is rejected.
Note
The calculated quantity may be fractional and below 1. Parameters| Name | GraphQL type | Required | Description |
|---|---|---|---|
oddsOrder | OddsOrder! | Yes | — |
geoLocation | GeoLocationCode | No | — |
deviceInfo | DeviceInfo | No | — |
placeRiskOrder
Mutation — returns OrderResult.
Place Market Order with Amount
This mutation creates a market order with specified amount. The quantity of the order is set to null, which makes the order to be matched up until the given amount is filled. In case the account has less available balance than the specified amount, the market order is filled up to the available balance. Parameters| Name | GraphQL type | Required | Description |
|---|---|---|---|
riskOrder | RiskOrder! | Yes | — |
geoLocation | GeoLocationCode | No | — |
deviceInfo | DeviceInfo | No | — |

