orders

Retrieve current orders on Smarkets, these include open and recently settled orders.

get/v3/orders/

Query parameters

contract_idstring

This ID uniquely identifies the contract

This ID uniquely identifies the contract

created_datetime_maxstring date-time

When was the order created

When was the order created

created_datetime_minstring date-time

When was the order created

When was the order created

idstring[]

Order IDs to filter by

Order IDs to filter by

[
  "1518455672861"
]
limitinteger

Maximum number of orders to be retrieved in one API call

Maximum number of orders to be retrieved in one API call

market_idstring[]

Market IDs to filter by

Market IDs to filter by

[
  "128939"
]
pagination_last_idstring

The last order id from the previous page, so we can fetch the subsequent orders.<br> It should be used in conjuntion with the sort parameter

The last order id from the previous page, so we can fetch the subsequent orders.<br> It should be used in conjuntion with the sort parameter

sequence_number_maxinteger

This refers to the sequence number in the account activity - statement endpoint

This refers to the sequence number in the account activity - statement endpoint

sequence_number_mininteger

This refers to the sequence number in the account activity - statement endpoint

This refers to the sequence number in the account activity - statement endpoint

statestring[]

Order states to filter by. By default all order states are returned

Order states to filter by. By default all order states are returned

[
  "created"
]
side'buy' | 'sell'

side can either be:<ul>

<li>buy: backing a contract <li>sell: laying a contract </ul>

side can either be:<ul>

<li>buy: backing a contract <li>sell: laying a contract </ul>
sort'id' | '-id'

How to sort the results, it should be used in conjuntion with the pagination parameter

How to sort the results, it should be used in conjuntion with the pagination parameter

include_promotion_databoolean

Whether to enrich the response with bet token and promotion data.<br> Set to false to skip the promotion lookup when those fields are not needed, in which case they are returned empty

Whether to enrich the response with bet token and promotion data.<br> Set to false to skip the promotion lookup when those fields are not needed, in which case they are returned empty

Response

Orders success response

otc_availableboolean

Example response

{
  "orders": [
    {
      "average_price_matched": 5000,
      "average_price_matched_precise": "5000",
      "best_price": {
        "price": 5000,
        "source": "bet365"
      },
      "contract_id": "123456",
      "created_datetime": "2012-08-14T00:56:45.291688Z",
      "id": "1518455672861",
      "label": "strategy_1",
      "last_modified_datetime": "2012-08-14T00:56:45.291688Z",
      "market_id": "128939",
      "original_order_id": "1518455672861",
      "outcome": "winner",
      "price": 5000,
      "quantity": 10000,
      "quantity_filled": 10000,
      "quantity_filled_pending": 2500,
      "quantity_filled_pending_user_currency": 2500,
      "quantity_filled_user_currency": 10000,
      "quantity_traded_out_user_currency": 10000,
      "quantity_unfilled": 2500,
      "quantity_unfilled_user_currency": 2500,
      "quantity_user_currency": 10000,
      "sequence_number": 94115,
      "side": "buy",
      "state": "created",
      "token_used": {
        "bet_token_type": "free_bet",
        "boost_percent": 1,
        "original_price": 5000
      },
      "type": "good_til_halted"
    }
  ],
  "pagination": {
    "next_page": "?limit=20&pagination_last_id=810214202189041"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.