Skip to content

Transaction#

About#

Transaction

Fields#

Name Type Required Description
id string Yes transaction id
type string Yes transaction type. See mql5 docs. One of DEAL_TYPE_BUY, DEAL_TYPE_SELL, DEAL_TYPE_BALANCE, DEAL_TYPE_CREDIT, DEAL_TYPE_CHARGE, DEAL_TYPE_CORRECTION, DEAL_TYPE_BONUS, DEAL_TYPE_COMMISSION, DEAL_TYPE_COMMISSION_DAILY, DEAL_TYPE_COMMISSION_MONTHLY, DEAL_TYPE_COMMISSION_AGENT_DAILY, DEAL_TYPE_COMMISSION_AGENT_MONTHLY, DEAL_TYPE_INTEREST, DEAL_TYPE_BUY_CANCELED, DEAL_TYPE_SELL_CANCELED, DEAL_DIVIDEND, DEAL_DIVIDEND_FRANKED, DEAL_TAX
time string(datetime) Yes transaction time (in ISO format)
subscriberId string Yes CopyFactory subscriber id
symbol string optional symbol traded
subscriberUser SubscriberOrProviderUser Yes strategy subscriber
demo boolean Yes demo account flag
providerUser SubscriberOrProviderUser Yes strategy provider
strategy StrategyIdAndName Yes strategy
positionId string source position id
slavePositionId string slave position id
improvement number Yes high-water mark strategy balance improvement
providerCommission number Yes provider commission
platformCommission number Yes platform commission
incomingProviderCommission number commission paid by provider to underlying providers
incomingPlatformCommission number platform commission paid by provider to underlying providers
quantity number trade volume
lotPrice number trade lot price
tickPrice number trade tick price
amount number trade amount
commission number trade commission
swap number trade swap
profit number Yes profit
metrics TransactionMetrics trade copying metrics such as slippage and latencies. Measured selectively for copied trades

Example#

{
  "id": "2235076744:close",
  "type": "DEAL_TYPE_BUY",
  "time": "2021-02-26T05:56:29.238Z",
  "subscriberId": "105646d8-8c97-4d4d-9b74-413bd66cd4ed",
  "symbol": "EURUSD",
  "subscriberUser": {
    "id": "5013f1322ae00d69167803d959e9f7dc",
    "name": "Bruce Wayne"
  },
  "demo": true,
  "providerUser": {
    "id": "5013f1322ae00d69167803d959e9f7dc",
    "name": "Clark Kent"
  },
  "strategy": {
    "id": "StMF",
    "name": "Test strategy",
  },
  "positionId": "+apNW3",
  "slavePositionId": "+apBW3",
  "improvement": 0,
  "providerCommission": 0.01,
  "platformCommission": 0.05,
  "incomingProviderCommission": 0,
  "incomingPlatformCommission": 0,
  "quantity": 1.99,
  "lotPrice": 121569.99999999999,
  "tickPrice": 1.2157,
  "amount": 241924.29999999996,
  "commission": -3.98,
  "swap": 0.06,
  "profit": -55.72,
  "metrics": {
    "tradeCopyingLatency": 261,
    "tradeCopyingSlippageInBasisPoints": -0.24676531795690237,
    "tradeCopyingSlippageInAccountCurrency": -5.969852681100103,
    "mtAndBrokerSignalLatency": 72,
    "tradeAlgorithmLatency": 35,
    "mtAndBrokerTradeLatency": 176,
  }
}

Usages#