- Query all trades on an order by ID
Get all fills for the order ID assigned by Integral returned in the coId or orderId field when the order was placed.
- Mock serverhttps://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades
const query = new URLSearchParams({
coId: 'OrderXEL278vv1',
orderId: '4820275011'
}).toString();
const resp = await fetch(
`https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades?${query}`,
{
method: 'GET',
headers: {
SSO_TOKEN: 'YOUR_API_KEY_HERE'
}
}
);
const data = await resp.text();
console.log(data);An array of trade objects. If an empty array, no trades were done for the given server order ID.
Trade tenor:
Today: todayTOD: todayON: overnight (today)TN: tomorrowSP: spotSPOT: spotSN: spot next (spot+1)- n
D: a number of days after the current business date (for example, 1D, 2D, 10D) - n
W: a number of weeks after the current business date (for example, 1W, 2W, 3W) - n
M: a number of months after the current business date (for example, 1M, 2M, 3M) - n
Y: a number of years after the current business date (for example, 1Y, 2Y, 3Y) - n
IMM: The next International Monetary Market (IMM) settlement date. IMM dates are the third Wednesday of the last month of every quarter (March, June, September, December).IMMresults in the next IMM date on or after the spot date.2IMMresults in two IMM dates after the spot date. SnIMM: (spot + IMM) for swapsTnIMM: (tomorrow + IMM) for swaps
Date and time trade was done in the format yyyy-MM-dd HH:mm:ss,SSS Z.
true: Maker (the deal was initiated by submitting a request or from working the balance on an outstanding order).false: Taker (the deal was initiated by taking a dealable price in the app).
Status of the trade when the message was created:
- Pending
- Verified
- Rejected
Dealt instrument pair (currency, metal, energy, index, crypto), seven-character ISO code (for example, AUD/USD).
The ID of the originating request for price from a system external to Integral.
The ID of the originating request for price from Integral systems.
Far-leg International Securities Identification Number for multi-leg trades.
Near-leg International Securities Identification Number for multi-leg trades.
Collection of parameters that are unique to your organization. The number of parameters, their keynames, and values are defined by you.
Contact your Integral Customer Engineer 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 customParameters property is 3500 characters, including all keys, values, and JSON syntax characters.
One object per fill, each a complete trade with its own tradeId, so a partially filled order returns several.
[ { "orderId": "4821376492", "tradeId": "FXI9222972502", "tradeType": "Spot", "tenor": "SPOT", "tradeDate": "2022-08-16", "valueDate": "2022-08-18", "executionTime": "2022-08-16 08:24:13,239 +0000", "maker": false, "orderSide": "Sell", "status": "Verified", "symbol": "EUR/USD", "dealtIns": "EUR", "customerAccount": "Cust12LE", "customerOrg": "Cust12", "trader": "MD", "counterParty": "SOR4", "cptyLongName": "SOR4", "coverTradeIds": [], "cptyTradeId": "Exec-db08b0657900eb", "counterPartyAccount": "SOR4LE", "counterpartyALEI": "549300YLYOXGEYO4YK89", "externalRequestId": "FXI9222877130", "benchmarkRate": 0, "dealtAmount": 2000000, "settledAmount": 2372460, "baseAmount": 2000000, "termAmount": 2372460, "spotRate": 1.18623, "rate": 1.18623, "fees": 0, "initialSettledAmount": 2372460, "midMarket": false, "upi": "EUR_USD_SPOT", "uti": "MCQRZU5ST1INP9222972502", "customParameters": { … } }, { "orderId": "4821376492", "tradeId": "FXI9222972501", "tradeType": "Spot", "tenor": "SPOT", "tradeDate": "2022-08-16", "valueDate": "2022-08-18", "executionTime": "2022-08-16 08:24:15,882 +0000", "maker": false, "orderSide": "Sell", "status": "Verified", "symbol": "EUR/USD", "dealtIns": "EUR", "customerAccount": "Cust12LE", "customerOrg": "Cust12", "trader": "MD", "counterParty": "SOR4", "cptyLongName": "SOR4", "coverTradeIds": [], "cptyTradeId": "Exec-db08b064811338", "counterPartyAccount": "SOR4LE", "counterpartyALEI": "549300YLYOXGEYO4YK89", "externalRequestId": "FXI9222877130", "benchmarkRate": 0, "dealtAmount": 1000000, "settledAmount": 1186240, "baseAmount": 1000000, "termAmount": 1186240, "spotRate": 1.18624, "rate": 1.18624, "regulatory": { … }, "fees": 0, "initialSettledAmount": 1186240, "midMarket": false, "upi": "EUR_USD_SPOT", "uti": "MCQRZU5ST1INP9222972501" } ]