GET POST List Orders
GET POST https://api.swaycharts.io/dxsca-web/accounts/{account code}/orders/history
GET POST https://api.swaycharts.io/dxsca-web/accounts/orders/history?accounts={account codes}
Retrieve historical orders (both working orders and orders in final state) on an account. User can always view orders on his own accounts, but can only view orders of other accounts if a special permission is set.
POST
is supported to overcome the query URI length restriction with GET
. Clients are expected to use POST
in case complex queries are issued
// Request
Empty request
Authorization header should be included in case of basic authentication
// Path Parameters
account code - unique code assigned to an account (see Account Code)
// Query Parameters
The following parameters are supported to query orders for multiple accounts:
account codes (optional) - comma-separated list of unique codes assigned to an account (see Account Code)
page (optional) - indicates the virtual 'page' of data to return. The first page is 1.
page-size (optional) - size of the virtual page
in-status (optional) - a comma-separated filter for order statuses. See order statuses.
of-type (optional) - a filter of order types, comma-separated. Possible values are market, limit, stop.
issued-from, issued-to (optional) - a filter for the order issue timestamp in UTC (see Dates and Times). Filter is inclusive.
If only issued-from is specified, all orders from this time until now are returned. If only issued-to is specified, all transfers from the very first order on an account until the specified time are returned.
period (optional) - a shortcut filter for order issue timestamp. A set of predefined values to query orders:
today – lists all orders issued in the current business day
previous-day – lists all orders issued in the previous day
week – lists all orders issued this trading week
previous-week – lists all orders issued the previous trading week
transaction-from, transaction-to (optional) - a filter for the last modification timestamp in UTC (see Dates and Times). Filter is inclusive.
completed-from, completed-to (optional) - a filter for the order completion timestamp in UTC (see Dates and Times). Filter is inclusive.
at-least-version (optional) - a filter for the account version related to the last order update. If present, limits the result set to include only orders which have the specified numeric version or greater.
at-most-version (optional) - a filter for the account version related to the last order update. If present, limits the result set to include only orders which have the specified numeric version or smaller.
side (optional) - a filter for the order side, either buy or sell
with-client-id - a filter based on order unique ids assigned by client. Comma-separated list of ids is accepted. The list cannot be longer than 50 ids.
with-order-id - a filter based on the order unique numeric ids assigned by server when an order is initially placed. List of ids is accepted. The list cannot be longer than 50 ids.
for-instrument - a filter for the order instrument (specified as comma-separated list of symbols)
Multiple values in comma-separated filters are treated as "or" – an order that has any of these properties is returned.
// Response
A list of most recent orders (both completed and working) as a historic order list
The ETag header is not sent.
// Errors
Common errors
API is not permitted for the user
Status code: 404 Not Found
Error code: 2
Description: Entity not found at server
Request URI is malformed (request parameters are incorrect)
Status code: 400 Bad Request
Error code: 32
Description: Incorrect request parameters (<request parameter that was incorrect>)
Last updated