- Query order (client ID or all active orders)
Get the order for the given client order ID. Omit the request parameter coId to return all active orders.
const query = new URLSearchParams({coId: 'Order25'}).toString();
const resp = await fetch(
`https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/orders?${query}`,
{
method: 'GET',
headers: {
SSO_TOKEN: 'YOUR_API_KEY_HERE'
}
}
);
const data = await resp.text();
console.log(data);An array of orders that match the request.
Buy or Sell from the order placer’s perspective and always for the dealt currency.
Base and term currency separated by a slash / (for example EUR/USD).
Organization ID in Integral's system. If the order was placed on behalf of another organization, this parameter contains the other organization's ID.
The ID of the account (legal entity) for which the order was placed. Required when placing orders on behalf of another organization.
Expiry time when timeInForce=GTT. In seconds. Max value is one day (86399 seconds).
Time the order was submitted in the format yyyy-MM-dd HH:mm:ss,SSS Z.
Algo: The algo or strategy of the order:
MidFixingTwapLitSwitchDarkSwitch
The original client order ID of the order to be cancelled or replaced by this request.
Execution strategy requested with order:
BidTrigger: Stay on bid sideMidTrigger: Mid priceOfferTrigger: Stay on offer side
Amount of the order visible to other market participants:
- 0 (zero) or undefined: Hidden: Order is not visible to other customers.
- Equal to
size: Display: Full order amount visible to other customers. - Less than
size: Iceberg: Only the value ofmaxShowvisible.
Average price of all fills so far. For orders and order types with timeInForce=FOK such as at-best orders, this is the filled price.
Fully qualified user name of order submitting user, including namespace and organization ID in the format userName@namespace.orgID.
RECEIVED: Order received.NEW: Order has been entered and is working according to the order type and specified execution strategy.PARTIALLY_FILLED: Trade done that does not completely fill the order.FILLED: Trade done that completely fills the order.PENDING_CANCEL: Cancel order request has been received and is in process.CANCELED: Order has been canceled.REPLACED: Order has been replaced with a new order.STOPPED: Price matching has been paused for the order.REJECTED: Order has been rejected.EXPIRED: Order expired.FAILED: Order failed.
Orders with status=FAILED or status=REJECTED, the reason for failure or rejection. INTERNAL_SERVER_ERROR indicates a serious error. Stop trading immediately and contact Business Support to resolve the issue.
Relative time at which the strategy should start execution specified in the format HH:MM:SS.sss. If not specified, the strategy starts executing immediately.
Absolute time in GMT at which the strategy should stop executing. If not specified, the order expires based on the value of its time in force.
The amount in pips that is added to the price of the peg. Can be positive or negative.
Action taken at the end of the algo’s duration if there is an unfilled amount remaining. If not specified, the order is cancelled at expiration. NoAction, FillAtMarket, Twap
Time for which each slice rests in OCX RiskNet. Specified in milliseconds. Overrides passiveTimeFactor.
Determines how long each slice rests in OCX RiskNet, calculated as a percent of the actual slice interval. Required if passiveTime is not set
Interval between slices in milliseconds. If the interval is fixed, this value is the interval duration. If the interval is randomized, this value is the upper boundary of random values.
The percentage range that the sliceInterval is randomized.
If sliceSize undefined, the slice size is this percentage of the top-of-book price size.
Collection of parameters that are unique to your organization. The number of parameters, their keynames, and values are defined by you.
Contact your Integral Technical Account Manager to enable and configure custom parameters.
Your custom parameters are included in API responses and in STP trade download.
Custom parameters sent to Integral via API are stored in the database directly. No validation is performed.
The maximum size of the customParameter property is 3500 characters, including all keys, values, and JSON syntax characters.
- coId included, active order, limit
- coId included, filled order, at best
- coId included, canceled order, limit
- coId omitted, all active orders
[ { "coId": "Order25", "type": "Limit", "timeInForce": "DAY", "side": "Buy", "currency": "EUR", "symbol": "EUR/USD", "size": 1000000, "org": "pfOrg", "account": "pfOrgLE", "price": 1.1993, "actionOnExpiry": "NoAction", "averagePrice": 0, "cumQty": 0, "orderId": "4860875001", "tradeDate": "2022-10-11", "userFullName": "user1@pfgOrg", "action": "place", "status": "NEW" } ]