Get Orders

GET/accounts/{accountId}/ordersHistory

Return all orders for the specified account.

Path Parameters

accountIdstringrequired

The account identifier.

Query Parameters

startTimenumberoptional

Start timestamp in milliseconds. Example: 1736772969000.

endTimenumberoptional

End timestamp in milliseconds. Example: 1736772969000.

pageIndexintegeroptional

Page number (1-based). Defaults to 1.

pageSizeintegeroptional

Records per page. Defaults to 100.

instrumentstringoptional

Filter by ticker symbol. Example: AAPL.

sidestringoptional

Filter by order direction. Enum: buy; sell; sellShort; buyToCover. Multiple values joined with |, e.g. buy|sell.

statusstringoptional

Filter by order status. Enum: pending; filled; rejected; cancelled; partialFilled. Multiple values joined with |, e.g. pending|filled.

Response

200application/json

Successful response.

sstring

Status indicator. ok on success.

dobject[]

Array of orders.

d[].idstring

Unique order identifier.

d[].instrumentstring

Ticker symbol.

d[].namestring

Security name.

d[].securityTypestring

Asset class.

d[].sidestring

Order direction.

d[].typestring

Order type.

d[].qtynumber

Requested quantity in shares.

d[].amountnumber

Requested notional value (used when quantityType is amount).

d[].quantityTypestring

How quantity is expressed.

d[].limitPricenumber

Limit price for limit and stopLimit orders.

d[].stopPricenumber

Stop trigger price for stop and stopLimit orders.

d[].durationTypestring

Time-in-force.

d[].extendHoursstring

Extended hours participation.

d[].statusstring

Current order status.

d[].isActiveboolean

true if the order is still open and working.

d[].filledQtynumber

Number of shares filled so far.

d[].filledAmountnumber

Total notional value filled.

d[].avgPricenumber

Average execution price.

d[].filledTimenumber

Unix timestamp (ms) of the last fill. 0 if unfilled.

d[].lastModifiednumber

Unix timestamp (ms) of the last status change.

d[].exchangestring

Exchange identifier.

d[].unitnumber

Contract unit size.

d[].messageobject

Human-readable status message from the broker.

d[].message.textstring

Message text.

d[].message.typestring

Message severity.

Response

errorapplication/json

Error response.

sstring

Error code string, e.g. invalid_grant.

errmsgstring

Human-readable error message.

Response Example

{
  "s": "ok",
  "d": [
    {
      "id": "0434111664758259712",
      "instrument": "UPXI",
      "name": "Upexi",
      "securityType": "stock",
      "side": "sell",
      "type": "market",
      "qty": 1.0,
      "amount": 0.0,
      "quantityType": "qty",
      "limitPrice": 0.0,
      "stopPrice": 0.0,
      "durationType": "Day",
      "extendHours": "Regular",
      "status": "Rejected",
      "isActive": false,
      "filledQty": 0.0,
      "filledAmount": 0.0,
      "avgPrice": 0.0,
      "filledTime": 0,
      "lastModified": 1728569086321,
      "exchange": "186",
      "unit": 1,
      "message": {
        "text": "Order is rejected: Corporate action in progress, trading restricted temporarily",
        "type": "error"
      }
    }
  ]
}