Get executed trades that have not been downloaded before.
To get trades that have been previously downloaded, you must first call the Prepare trades to resend endpoint.
Get executed trades that have not been downloaded before. The default maximum number of trades returned is determined by the server. You should poll this endpoint until you receive an empty response indicating that there are no remaining executed trades available for STP download.
To get trades that have been previously downloaded, you must first call the Prepare trades to resend endpoint.
const query = new URLSearchParams({maxCount: '20'}).toString();
const resp = await fetch(
`https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades/stp/messages?${query}`,
{
method: 'GET',
headers: {
SSO_TOKEN: 'YOUR_API_KEY_HERE'
}
}
);
const data = await resp.text();
console.log(data);A list of executed trades. An empty response indicates no executed trades available.
Status of the trade so you can decide how to treat the download.
NEW: Trade downloaded for the first time.RESEND: A previously downloaded trade that is sent again with no changes
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).
Side of the order from the customer's perspective, either Buy or Sell.
Status of the trade when the message was created. STP returns Verified and Canceled trades.
Dealt instrument pair (currency, metal, energy, index, crypto), for example AUD/USD.
May be omitted. ID of the originating rate for previously quoted (PQ) orders.
Category of trade origin or intent. Applicable when received by a taker.
GUIAPICOVERHEDGE_RISK
May be omitted. 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
May be omitted. Far-leg tenor for swaps.
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
May be omitted. Far-leg fixing tenor for NDF swaps. Required if farFixingDate not specified.
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
May be omitted. Far-leg fixing date for NDF swaps in the format YYYY-MM-DD. Required if farFixingTenor not specified.
May be omitted. Far-leg value date for swaps in the format YYYY-MM-DD.
May be omitted. For batch trades and SSPs, the containing portfolio ID.
May be omitted. Far-leg International Securities Identification Number for multi-leg trades.
May be omitted. Near-leg International Securities Identification Number for multi-leg trades.
May be omitted. International Securities Identification Number link ID.
May be omitted. Any notes on the order entered by the order submitting user.
Date and time trade was done in the format yyyy-MM-dd HH:mm:ss,SSS Z.
May be omitted. Forward points for outright trades and near leg of swaps.
May be omitted. Far-leg amount in the settlement instrument for swaps.
May be omitted. Forward points of the trade that covered this trade.
May be omitted. Far-leg spot rate of the trade that covered this trade.
May be omitted. Far-leg forward points of the trade that covered this trade.
Cover risk management type. Applicable when received by a maker.
COVERNO_COVERWAREHOUSE
May be omitted. Spreads on the trade. Available to makers who have configured STP to include market rate and spreads.
May be omitted. Only applicable to FX Yield Manager. If FX Yield Manager is used to manage positions, this is the name of the book, if any, to which the trade is entered.
A= Cover trades, both customer trades and its cover trades.B= Warehoused customer trades, FX Yield Manager hedging trades.- empty = No-cover trades, unmanaged trades, desk trades.
May be omitted. ID of the trade covered by this trade, if any.
ID of the customer org that originated the trade with the broker.
May be omitted. Component currency used to price the synthetic currency pair.
SWIFT MT 300 Foreign Exchange Confirmation, field 72 Sender to Receiver Information
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.
- Spot from limit order, taker download
- Spot from limit order, taker download, custom parameters
- Spot, taker download
- Customer and cover trade, spot, maker download
- Customer trade, outright, taker download
- Customer and cover trade, outright, maker download
- Resend, spot, taker download
[ { "orderId": "4820276016", "tradeId": "FXI9369258100", "tradeType": "Spot", "tradeDate": "2023-06-02", "valueDate": "2023-06-15", "maker": false, "side": "Buy", "status": "Verified", "symbol": "EUR/USD", "currency": "EUR", "customerAccount": "CustomerOrgle1", "customerOrg": "CustomerOrg", "user": "userName@CustomerOrg", "counterparty": "BrokerOrg1", "counterpartyLongName": "The Broker Org", "counterpartyAccount": "BrokerOrg1LE5", "coId": "8932452311944", "channel": "API/REST/ESP", "executionTime": "2023-06-02 18:31:01,301 +0000", "dealtAmount": 1000000, "settledAmount": 1097166.9, "baseAmount": 1000000, "termAmount": 1097166.9, "spotRate": 1.0971669, "rate": 1.0971669, "event": "NEW", "channelCategory": "API", "upi": "EUR_USD_SPOT", "uti": "1234567890AQUSUUINP9349138130" } ]