# Get done trades 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. Endpoint: GET /v2/trades/stp/messages Version: 1.0.1 Security: SSO_TOKEN ## Query parameters: - `maxCount` (integer) Max number of trades to download. If not specified, the default max number of trades is used (currently 50). Example: 20 ## Response 200 fields (application/json): - `orderId` (string, required) Order ID. For cover trades, this is the cover order ID. - `tradeId` (string, required) Integral trade ID. - `coId` (string, required) Customer-supplied order ID. - `event` (string, required) Status of the trade so you can decide how to treat the download. - : Trade downloaded for the first time. - : A previously downloaded trade that is sent again with no changes - `tradeType` (string, required) Trade type: - - - - - - - `tradeDate` (string, required) Date the trade was initiated in the format . - `valueDate` (string, required) Value date in the format . - `fixingDate` (string) (NDF trades) Fixing date in the format . - `fixingTenor` (string) (NDF trades) Fixing tenor. - `maker` (boolean, required) - : Maker (the deal was initiated by submitting a request or from working the balance on an outstanding order). - : Taker (the deal was initiated by taking a dealable price in the app). - `side` (string, required) Side of the order from the customer's perspective, either or . - `status` (string, required) Status of the trade when the message was created. STP returns only trades. - `symbol` (string, required) Dealt instrument pair (currency, metal, energy, index, crypto), for example . - `currency` (string, required) Dealt currency, for example . - `rateId` (string) May be omitted. ID of the originating rate for previously quoted (PQ) orders. - `customerAccount` (string) Settlement code when available. - `customerOrg` (string, required) Customer org ID. - `user` (string, required) Full name of the user who entered the trade. - `counterparty` (string, required) Counterparty ID. - `counterpartyLongName` (string) Counterparty name. - `counterpartyTradeId` (string,null) Trade ID assigned by counterparty. - `counterpartyAccount` (string) Counterparty settlement code when available. - `channel` (string) Workflow, app, and UI component that originated the request. - `channelCategory` (string) Category of trade origin or intent. Applicable when received by a taker. - - - - - `tenor` (string) May be omitted. Trade tenor. - : today - : today - : overnight (today) - : tomorrow - : spot - : spot - : spot next (spot+1) - : a number of days after the current business date (for example, 1D, 2D, 10D) - : a number of weeks after the current business date (for example, 1W, 2W, 3W) - : a number of months after the current business date (for example, 1M, 2M, 3M) - : a number of years after the current business date (for example, 1Y, 2Y, 3Y) - : 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). results in the next IMM date on or after the spot date. results in two IMM dates after the spot date. - : (spot + IMM) for swaps - : (tomorrow + IMM) for swaps - `farTenor` (string) May be omitted. Far-leg tenor for swaps. - : today - : today - : overnight (today) - : tomorrow - : spot - : spot - : spot next (spot+1) - : a number of days after the current business date (for example, 1D, 2D, 10D) - : a number of weeks after the current business date (for example, 1W, 2W, 3W) - : a number of months after the current business date (for example, 1M, 2M, 3M) - : a number of years after the current business date (for example, 1Y, 2Y, 3Y) - : 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). results in the next IMM date on or after the spot date. results in two IMM dates after the spot date. - : (spot + IMM) for swaps - : (tomorrow + IMM) for swaps - `farFixingTenor` (string) May be omitted. Far-leg fixing tenor for NDF swaps. Required if not specified. - : today - : today - : overnight (today) - : tomorrow - : spot - : spot - : spot next (spot+1) - : a number of days after the current business date (for example, 1D, 2D, 10D) - : a number of weeks after the current business date (for example, 1W, 2W, 3W) - : a number of months after the current business date (for example, 1M, 2M, 3M) - : a number of years after the current business date (for example, 1Y, 2Y, 3Y) - : 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). results in the next IMM date on or after the spot date. results in two IMM dates after the spot date. - : (spot + IMM) for swaps - : (tomorrow + IMM) for swaps - `farFixingDate` (string) May be omitted. Far-leg fixing date for NDF swaps in the format . Required if not specified. - `farValueDate` (string) May be omitted. Far-leg value date for swaps in the format . - `farSide` (string) May be omitted. Side of the far leg for swaps. - `customerLEI` (string) May be omitted. Customer LEI code. - `counterpartyLEI` (string) May be omitted. Counterparty LEI code. - `upi` (string) May be omitted. Unique Product Identifier for SEF trades. - `uti` (string) May be omitted. Unique Transaction Identifier for SEF trades. - `usi` (string) May be omitted. Unique Swap Identifier for near leg of SEF swaps. - `farUSI` (string) May be omitted. Unique Swap Identifier for far leg of SEF swaps. - `exchange` (string) May be omitted. Exchange ID. - `portfolioId` (string) May be omitted. For batch trades and SSPs, the containing portfolio ID. - `parentUSI` (string) May be omitted. Unique Swap Identifier for SEF swaps. - `isNet` (boolean) Whether or not the trade was done to net another trade. - `midMarket` (boolean) Whether or not the trade was done at the mid-market rate. - `regulatory` (object) May be omitted. An object containing regulatory information. - `regulatory.orderSubmissionTime` (string) Date/time order was submitted in the format . - `regulatory.tradeExecutionTime` (string) Date/time trade was executed in the format . - `regulatory.mtf` (boolean) Whether or not the trade was done in a multilateral trading facility (MTF). - `regulatory.mtfVenue` (string) ID of the multilateral trading facility (MTF) venue. - `regulatory.investmentDecisionMaker` (string) Investment decision maker per MiFID II. - `regulatory.takerCapacity` (string) Capacity in which the trade is reported, for example dealing on your own account, in matched principal, or any other capacity. - `regulatory.executingUser` (string) ID of the user who executed the trade. - `regulatory.executingOrg` (string) ID of the executing organization. - `regulatory.makerExecutingFirm` (string) ID of the maker executing firm. - `regulatory.takerExecutingFirm` (string) ID of the taker executing firm. - `regulatory.siExecution` (boolean) Whether or not this trade was done by a Systematic Internaliser (SI) per MiFID II. - `regulatory.siVenue` (string) ID of the Systematic Internaliser (SI) venue. - `regulatory.sft` (boolean) Whether or not the trade is a securities financing transaction (SFT) per MiFID II. - `regulatory.npft` (boolean) Whether or not the trade is a non-price-forming transaction (NPFT) per MiFID II. - `regulatory.preTradeWaiver` (string) Pre-trade waiver, if any, per MiFID II. - `regulatory.postTradeDeferral` (string) Post-trade deferral due to size or liquidity, if any, per MiFID II. - `regulatory.takerCountryCode` (string) Taker's country code. - `regulatory.makerCountryCode` (string) Maker's country code. - `regulatory.customerCountryCode` (string) Customer's country code. - `regulatory.customerAccount` (string) ID of customer's account. - `benchmarkRate` (number) Reference benchmark rate. - `farLegISIN` (string) May be omitted. Far-leg International Securities Identification Number for multi-leg trades. - `nearLegISIN` (string) May be omitted. Near-leg International Securities Identification Number for multi-leg trades. - `isinLinkId` (string) May be omitted. International Securities Identification Number link ID. - `notes` (string) May be omitted. Any notes on the order entered by the order submitting user. - `executionTime` (string, required) Date and time trade was done in the format . - `dealtAmount` (number, required) Amount of the dealt currency. - `settledAmount` (number) Amount of the settlement currency. - `baseAmount` (number, required) Amount of base currency. - `termAmount` (number, required) Amount of term currency. - `spotRate` (number, required) Spot rate of the trade or near leg of the trade. - `rate` (number, required) All-in rate. - `forwardPoints` (number) May be omitted. Forward points for outright trades and near leg of swaps. - `swapPoints` (number) May be omitted. Swap points, if any. - `farRate` (number) May be omitted. Far-leg rate for swaps. - `farDealtAmount` (number) May be omitted. Far-leg amount in the dealt instrument for swaps. - `farSettledAmount` (number) May be omitted. Far-leg amount in the settlement instrument for swaps. - `farBaseAmount` (number) May be omitted. Far-leg amount in the base instrument for swap. - `farTermAmount` (number) May be omitted. Far-leg amount in the term instrument for swaps. - `farForwardPoints` (number) May be omitted. Far-leg forward points for swaps. - `mifidBenchmarkRate` (number) May be omitted. Reference benchmark rate per MiFID II. - `fees` (number) May be omitted. Fees on the trade, if any. - `initialSettledAmount` (number) May be omitted. Initial settled amount before any amendment. - `stream` (string) May be omitted. ID of the stream that priced the trade. - `midRate` (number) May be omitted. Spot or near-leg mid rate for swaps. - `farMidRate` (number) May be omitted. Far-leg mid rate for swaps. - `coverRate` (number) May be omitted. Rate of the trade that covered this trade. - `coverSpotRate` (number) May be omitted. Spot rate of the trade that covered this trade. - `coverForwardPoints` (number) May be omitted. Forward points of the trade that covered this trade. - `coverFarRate` (number) May be omitted. Far-leg rate of the trade that covered this trade. - `coverFarSpotRate` (number) May be omitted. Far-leg spot rate of the trade that covered this trade. - `coverFarForwardPoints` (number) May be omitted. Far-leg forward points of the trade that covered this trade. - `coverRiskManagementType` (string) Cover risk management type. Applicable when received by a maker. - - - - `spreads` (object) May be omitted. Spreads on the trade. Available to makers who have configured STP to include market rate and spreads. - `spreads.pmNearSpread` (number) Trading spread. Total forward spread applied to the near leg. This value includes price improvement, if any. - `spreads.pmFarSpread` (number) Trading spread. Total forward spread applied to the far leg. This value includes price improvement, if any. - `spreads.pmPreSpotSpread` (number) Trading spread. Spot spread applied by trading via price making configurations in the pricing engine. This is applicable to spot, outright, and swap trades. - `spreads.pmSpotSpread` (number) Trading spread. Spot spread applied by trading via price making configurations in the pricing engine. This is applicable to spot, outright, and swap trades. - `spreads.ppSpotSpread` (number) Sales spread. Spot spread applied by a salesperson via the price provisioning section in the pricing engine. This is applicable to spot, outright, and swap trades. - `spreads.ppNearSpread` (number) Sales spread. Fixed spread applied to the near leg as defined in the price provisioning rule applied to the spot rate. - `spreads.ppFarSpread` (number) Sales spread. Fixed spread applied to the near leg as defined in the price provisioning rule applied to the spot rate. - `spreads.ppCustSpread` (number) Sales spread. Sum of the spot spread (), the near leg spread (), and the far leg forward spread (). - `bookName` (string) 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. - = Cover trades, both customer trades and its cover trades. - = Warehoused customer trades, FX Yield Manager hedging trades. - empty = No-cover trades, unmanaged trades, desk trades. - `coveredTradeId` (string) May be omitted. ID of the trade covered by this trade, if any. - `coveredCounterparty` (string) ID of the customer org that originated the trade with the broker. - `isSynthetic` (boolean) May be omitted. Whether or not the symbol is a synthetic currency pair. - `syntheticComponent` (string) May be omitted. Component currency used to price the synthetic currency pair. - `MT300Field72` (string) SWIFT MT 300 Foreign Exchange Confirmation, field 72 Sender to Receiver Information - `customParameters` (object) 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 property is characters, including all keys, values, and JSON syntax characters. - `customParameters.keyName` (string) The keyname of a custom parameter key/value pair as defined by your organization. Contact your Integral Technical Account Manager to enable and configure custom parameters. - `customParameters.value` (string) The value of a custom parameter key/value pair as defined by your organization. Contact your Integral Technical Account Manager to enable and configure custom parameters.