Get Orders
Returns a paginated list of orders, most recently updated first. Requires any valid API key. This endpoint is rate-limited per account holder.
By default, if no params are provided, will return all open orders. In this mode from and to are ignored.
If with_cancelled_and_rejected and/or with_just_filled_inactive is set to true and no from/to is given, the lookback starts at the beginning (00:00 UTC) of the previous day.
A from and a to date can be provided. The maximum window size is 31 days. If a larger window is provided, you will receive a 400 INVALID_DATE_RANGE error.
from/to accept epoch (s, ms, µs or ns) or an ISO 8601 UTC timestamp ending in Z (or YYYY-MM-DD). from must be on or after 2024-01-01, not in the future, and strictly before to; to is inclusive.
cursor is an opaque string. Pass the value from the previous response unchanged; it is absent on the last page.
Unknown query parameters are rejected with 400 UNEXPECTED_PARAMETERS.
bearerAuthAuthorizationBearer <token>API key created in the One Trading UI, sent as Authorization: Bearer <token>. Each endpoint lists the key permission it needs.
from?stringDefines start of a query search. Ignored when returning open orders.
date-timeto?stringDefines end of a query search (inclusive). Ignored when returning open orders.
date-timeinstrument_code?stringInstrument code to get orders for, e.g. BTC_EUR
with_cancelled_and_rejected?booleanReturn orders which have been cancelled by the user before being filled or rejected by the system as invalid. Additionally, all inactive filled orders which would return with "with_just_filled_inactive".
falsewith_just_filled_inactive?booleanReturn order history for orders which have been filled and are no longer open. Use of "with_cancelled_and_rejected" extends "with_just_filled_inactive" and in case both are specified the latter is ignored.
falsewith_just_orders?booleanReturns order history for orders but does not return any trades corresponding to the orders. It may be significantly faster and should be used if user is not interesting in trade information. Can be combined with any other filter.
falsemax_page_size?integerSet max desired page size, from 1 to 100. If no value is provided, 100 results per page are returned. Values above 100 are rejected with 400 INVALID_PAGE_SIZE.
1 <= value <= 100100cursor?stringOpaque pagination cursor. Pass the cursor value from the previous response unchanged to get the next page.
OK
application/json- response
order_history*array<>The order history based on the specified request criteria
max_page_size*integerThe amount of items requested
cursor?stringOpaque cursor for the next page. Pass it unchanged as cursor in the next request. Absent on the last page.
from?|Start of the queried window (ISO 8601, nanosecond precision), or null when none applies. Not present when there are no open orders.
date-timeto?|End of the queried window (ISO 8601, nanosecond precision), or null when none applies. Not present when there are no open orders.
date-timecurl -X GET 'https://api.onetrading.com/fast/v1/account/orders?from=2025-02-13T16%3A00%3A00.000Z&to=2025-11-14T10%3A00%3A00.000Z&instrument_code=BTC_EUR&with_cancelled_and_rejected=false&with_just_filled_inactive=false&with_just_orders=true&max_page_size=5&cursor=eyJlcG9jaCI6IjE3MzE0ODg1NDE4NzY1NzAwMDAifQ%3D%3D'{ "order_history": [ { "order": { "account_id": "726288e6-a463-4f88-9068-024ae8f97a34", "order_id": "74eaf796-869b-4d49-ab39-2bc4fe10daeb", "client_id": "b8854ae6-4077-404b-ae0c-52a1fe318440", "amount": "1", "side": "SELL", "instrument_code": "SOL_EUR", "order_type": "API", "price": "140", "time": "2024-11-13T17:34:55.514Z", "time_nanos": "2024-11-13T17:34:55.514123456Z", "sequence": "58894260661", "total_fee": "0.29", "fee_currency": "EUR", "time_last_updated": "2024-11-13T17:34:55.514Z", "time_last_updated_nanos": "2024-11-13T17:34:55.514123456Z", "order_book_sequence": "58894260661", "filled_amount": "1", "status": "FILLED_FULLY", "average_price": "145.00" }, "trades": [ { "fee": { "fee_amount": "0.29", "fee_currency": "EUR" }, "trade": { "trade_id": "f99a7e64-5478-44f3-b404-19aac53f2062", "order_id": "74eaf796-869b-4d49-ab39-2bc4fe10daeb", "account_id": "726288e6-a463-4f88-9068-024ae8f97a34", "amount": "1", "filled_amount": "1", "side": "SELL", "instrument_code": "SOL_EUR", "price": "145", "time": "2024-11-13T17:34:55.514Z", "time_nanos": "2024-11-13T17:34:55.514123456Z", "sequence": "58894260661", "matched_as": "MAKER", "order_type": "API" } } ] }, { "order": { "account_id": "726288e6-a463-4f88-9068-024ae8f97a34", "order_id": "d8e8e090-a142-4574-a875-36ef769eafe3", "client_id": "89e6b540-2497-4d08-b777-9cf363940cab", "amount": "3.3333", "side": "BUY", "instrument_code": "SOL_EUR", "order_type": "API", "price": "150", "time": "2024-11-13T15:40:04.430Z", "time_nanos": "2024-11-13T15:40:04.430981234Z", "sequence": "58894259835", "time_last_updated": "2024-11-13T15:40:04.430Z", "time_last_updated_nanos": "2024-11-13T15:40:04.430981234Z", "order_book_sequence": "58894259835", "filled_amount": "0", "status": "OPEN" }, "trades": [] } ], "from": "2024-11-12T00:00:00.000000000Z", "to": "2024-11-13T18:00:00.000000000Z", "max_page_size": 2, "cursor": "eyJlcG9jaCI6IjE3MzE1MTY4MDQ0MzA5ODEyMzQifQ=="}