STP

Get trades as they are executed.

Requirements

Work with your Integral Technical Account Manager to make sure that your organization is configured for STP download via WebSocket:

  • Downloading User: must be the same as the user of the WebSocket session
  • Format: JSON
  • Transport Mechanism: WebSocket

Subscribe to STP

Subscribe to STP download to get trades as they are executed.

Request

{ "stpSubscription": [{
    "organization":"pfOrg"
  }]
}
organization
required
string<= 30 characters
Your organization ID.

Acknowledge

Response example: SUCCESS

{ "stpSubscription": {
    "organization": "pfOrg",
    "status": "SUCCESS"
  }
}

Response

An array with trades as they are executed.

orderId string<= 60 characters
Order ID. For cover trades, this is the cover order ID.
tradeId string<= 255 characters
Integral trade ID.
coId string<= 255 characters
Customer-supplied order ID.
event string<= 50 characters
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
tradeType string<= 20 characters
Trade type:
  • Spot
  • Outright
  • NDF
  • Swap
  • FwdFwd
  • NDFSwap
tradeDate string<= 20 characters
Date the trade was initiated in the format YYYY-MM-DD.
valueDate string<= 20 characters
Value date in the format YYYY-MM-DD.
fixingDate string<= 20 characters
(NDF trades) Fixing date in the format YYYY-MM-DD.
fixingTenor string<= 20 characters
(NDF trades) Fixing tenor.
maker boolean
  • 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 string<= 10 characters
Side of the order from the customer's perspective, either Buy or Sell.
status string<= 20 characters
Status of the trade when the message was created. STP returns only Verified trades.
symbol string<= 35 characters
Dealt instrument pair (currency, metal, energy, index, crypto), for example `AUD/USD`.
currency string<= 10 characters
Dealt currency, for example AUD.
rateId string<= 255 characters
May be omitted. ID of the originating rate for previously quoted (PQ) orders.
customerAccount string<= 30 characters
Settlement code when available.
customerOrg string<= 30 characters
Customer org ID.
user string<= 100 characters
Full name of the user who entered the trade.
counterparty string<= 30 characters
Counterparty ID.
counterpartyLongName string<= 255 characters
Counterparty name.
counterpartyTradeId string or null<= 255 characters
Trade ID assigned by counterparty.
counterpartyAccount string<= 30 characters
Counterparty settlement code when available.
channel string<= 100 characters
Workflow, app, and UI component that originated the request.
channelCategory string<= 50 characters
Category of trade origin or intent. Applicable when received by a taker.
  • GUI
  • API
  • COVER
  • HEDGE_RISK
tenor string<= 50 characters
May be omitted. Trade tenor.
  • Today: today
  • TOD: today
  • ON: overnight (today)
  • TN: tomorrow
  • SP: spot
  • SPOT: spot
  • SN: spot next (spot+1)
  • n: a number of days after the current business date (for example, 1D, 2D, 10D)
  • nW: a number of weeks after the current business date (for example, 1W, 2W, 3W)
  • nMv: a number of months after the current business date (for example, 1M, 2M, 3M)
  • nY: a number of years after the current business date (for example, 1Y, 2Y, 3Y)
  • nIMM: 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). IMM results in the next IMM date on or after the spot date. 2IMM results in two IMM dates after the spot date.
  • SnIMM: (spot + IMM) for swaps
  • TnIMM: (tomorrow + IMM) for swaps
farTenor string<= 50 characters
May be omitted. Far-leg tenor for swaps.
  • Today: today
  • TOD: today
  • ON: overnight (today)
  • TN: tomorrow
  • SP: spot
  • SPOT: spot
  • SN: spot next (spot+1)
  • n: a number of days after the current business date (for example, 1D, 2D, 10D)
  • nW: a number of weeks after the current business date (for example, 1W, 2W, 3W)
  • nMv: a number of months after the current business date (for example, 1M, 2M, 3M)
  • nY: a number of years after the current business date (for example, 1Y, 2Y, 3Y)
  • nIMM: 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). IMM results in the next IMM date on or after the spot date. 2IMM results in two IMM dates after the spot date.
  • SnIMM: (spot + IMM) for swaps
  • TnIMM: (tomorrow + IMM) for swaps
farFixingTenor string<= 50 characters
May be omitted. Far-leg fixing tenor for NDF swaps. Required if farFixingDate not specified.
  • Today: today
  • TOD: today
  • ON: overnight (today)
  • TN: tomorrow
  • SP: spot
  • SPOT: spot
  • SN: spot next (spot+1)
  • n: a number of days after the current business date (for example, 1D, 2D, 10D)
  • nW: a number of weeks after the current business date (for example, 1W, 2W, 3W)
  • nMv: a number of months after the current business date (for example, 1M, 2M, 3M)
  • nY: a number of years after the current business date (for example, 1Y, 2Y, 3Y)
  • nIMM: 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). IMM results in the next IMM date on or after the spot date. 2IMM results in two IMM dates after the spot date.
  • SnIMM: (spot + IMM) for swaps
  • TnIMM: (tomorrow + IMM) for swaps
farFixingDate string<= 20 characters
May be omitted. Far-leg fixing date for NDF swaps in the format YYYY-MM-DD. Required if farFixingTenor not specified.
farValueDate string<= 20 characters
May be omitted. Far-leg value date for swaps in the format YYYY-MM-DD.
farSide string<= 10 characters
May be omitted. Side of the far leg for swaps.
customerLEI string<= 100 characters
May be omitted. Customer LEI code.
counterpartyLEI string<= 100 characters
May be omitted. Counterparty LEI code.
upi string<= 50 characters
May be omitted. Unique Product Identifier for SEF trades.
uti string<= 150 characters
May be omitted. Unique Transaction Identifier for SEF trades.
usi string<= 150 characters
May be omitted. Unique Swap Identifier for near leg of SEF swaps.
farUSI string<= 150 characters
May be omitted. Unique Swap Identifier for far leg of SEF swaps.
exchange string<= 30 characters
May be omitted. Exchange ID.
portfolioId string<= 100 characters
May be omitted. For batch trades and SSPs, the containing portfolio ID.
parentUSI string<= 150 characters
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.
orderSubmissionTime string<= 32 characters
Date/time order was submitted in the format yyyy-MM-dd HH:mm:ss,SSS Z.
tradeExecutionTime string<= 32 characters
Date/time trade was executed in the format yyyy-MM-dd HH:mm:ss,SSS Z.
mtf boolean
Whether or not the trade was done in a multilateral trading facility (MTF).
mtfVenue string<= 30 characters
ID of the multilateral trading facility (MTF) venue.
investmentDecisionMaker string<= 30 characters
Investment decision maker per MiFID II.
takerCapacity string<= 10 characters
Capacity in which the trade is reported, for example dealing on your own account, in matched principal, or any other capacity.
executingUser string<= 30 characters
ID of the user who executed the trade.
executingOrg string<= 30 characters
ID of the executing organization.
makerExecutingFirm string<= 30 characters
ID of the maker executing firm.
takerExecutingFirm string<= 30 characters
ID of the taker executing firm.
siExecution boolean
Whether or not this trade was done by a Systematic Internaliser (SI) per MiFID II.
siVenue string<= 30 characters
ID of the Systematic Internaliser (SI) venue.
sft boolean
Whether or not the trade is a securities financing transaction (SFT) per MiFID II.
npft boolean
Whether or not the trade is a non-price-forming transaction (NPFT) per MiFID II.
preTradeWaiver string<= 10 characters
Pre-trade waiver, if any, per MiFID II.
postTradeDeferral string<= 10 characters
Post-trade deferral due to size or liquidity, if any, per MiFID II.
takerCountryCode string<= 3 characters
Taker's country code.
makerCountryCode string<= 3 characters
Maker's country code.
customerCountryCode string<= 3 characters
Customer's country code.
customerAccount string<= 30 characters
ID of customer's account.
benchmarkRate number <double>
Reference benchmark rate.
farLegISIN string<= 12 characters
May be omitted. Far-leg International Securities Identification Number for multi-leg trades.
nearLegISIN string<= 12 characters
May be omitted. Near-leg International Securities Identification Number for multi-leg trades.
isinLinkId string<= 12 characters
May be omitted. International Securities Identification Number link ID.
notes string<= 255 characters
May be omitted. Any notes on the order entered by the order submitting user.
executionTime string<= 32 characters
Date and time trade was done in the format yyyy-MM-dd HH:mm:ss,SSS Z.
dealtAmount number <double>
Amount of the dealt currency.
settledAmount number <double>
Amount of the settlement currency.
baseAmount number <double>
Amount of base currency.
termAmount number <double>
Amount of term currency.
spotRate number <double>
Spot rate of the trade or near leg of the trade.
rate number <double>
All-in rate.
forwardPoints number <double>
May be omitted. Forward points for outright trades and near leg of swaps.
swapPoints number <double>
May be omitted. Swap points, if any.
farRate number <double>
May be omitted. Far-leg rate for swaps.
farDealtAmount number <double>
May be omitted. Far-leg amount in the dealt instrument for swaps.
farSettledAmount number <double>
May be omitted. Far-leg amount in the settlement instrument for swaps.
farBaseAmount number <double>
May be omitted. Far-leg amount in the base instrument for swap.
farTermAmount number <double>
May be omitted. Far-leg amount in the term instrument for swaps.
farForwardPoints number <double>
May be omitted. Far-leg forward points for swaps.
mifidBenchmarkRate number <double>
May be omitted. Reference benchmark rate per MiFID II.
fees number <double>
May be omitted. Fees on the trade, if any.
initialSettledAmount number <double>
May be omitted. Initial settled amount before any amendment.
stream string<= 30 characters
May be omitted. ID of the stream that priced the trade.
midRate number <double>
May be omitted. Spot or near-leg mid rate for swaps.
farMidRate number <double>
May be omitted. Far-leg mid rate for swaps.
coverRate number <double>
May be omitted. Rate of the trade that covered this trade.
coverSpotRate number <double>
May be omitted. Spot rate of the trade that covered this trade.
coverForwardPoints number <double>
May be omitted. Forward points of the trade that covered this trade.
coverFarRate number <double>
May be omitted. Far-leg rate of the trade that covered this trade.
coverFarSpotRate number <double>
May be omitted. Far-leg spot rate of the trade that covered this trade.
coverFarForwardPoints number <double>
May be omitted. Far-leg forward points of the trade that covered this trade.
coverRiskManagementType string<= 20 characters
Cover risk management type. Applicable when received by a maker.
  • COVER
  • NO_COVER
  • WAREHOUSE
spreads object
May be omitted. Spreads on the trade. Available to makers who have configured STP to include market rate and spreads.
pmNearSpread number <double>
Trading spread. Total forward spread applied to the near leg. This value includes price improvement, if any.
pmFarSpread number <double>
Trading spread. Total forward spread applied to the far leg. This value includes price improvement, if any.
pmPreSpotSpread number <double>
Trading spread. Spot spread applied by trading via price making configurations in the pricing engine. This is applicable to spot, outright, and swap trades.
pmSpotSpread number <double>
Trading spread. Spot spread applied by trading via price making configurations in the pricing engine. This is applicable to spot, outright, and swap trades.
ppSpotSpread number <double>
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.
ppNearSpread number <double>
Sales spread. Fixed spread applied to the near leg as defined in the price provisioning rule applied to the spot rate.
ppFarSpread number <double>
Sales spread. Fixed spread applied to the near leg as defined in the price provisioning rule applied to the spot rate.
ppCustSpread number <double>
Sales spread. Sum of the spot spread (ppSpotSpread), the near leg spread (ppNearSpread), and the far leg forward spread (ppFarSpread).
bookName string<= 30 characters
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.
coveredTradeId string<= 255 characters
May be omitted. ID of the trade covered by this trade, if any.
coveredCounterparty string<= 30 characters
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<= 10 characters
May be omitted. Component currency used to price the synthetic currency pair.
MT300Field72 string<= 210 characters
SWIFT MT 300 Foreign Exchange Confirmation, field 72 Sender to Receiver Information

Example

{ "stpMessages": [
  { "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"
  }
  ]
}

Unsubscribe from STP

Unsubscribe from STP download and stop receiving STP messages.

:::attention NOTE STP download subscriptions are automatically ended when your WebSocket session ends. :::

Request

{ "stpUnsubscription": [{
    "organization": "pfOrg"
  }]
}
organization
required
string<= 30 characters
Your organization ID.

Acknowledge

{ "stpUnsubscription": {
    "organization": "pfOrg",
    "status": "SUCCESS"
  }
}