Skip to content

Transaction#

About#

Transaction

Fields#

Name Type Required Description
id string Yes transaction id
type string Yes transaction type. See mql5 docs = [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 Yes transaction time
accountId string Yes CopyFactory account id
symbol string optional symbol traded
subscriber SubscriberOrProvider Yes strategy subscriber
demo boolean Yes demo account flag
provider SubscriberOrProvider Yes strategy provider
strategy StrategyIdAndName Yes strategy
positionId string source 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",
  "accountId": "2DLmSEibEc1UeNpTXGcoZ22FqhFiaiUpxykfTuX2VbLMDD0NCuBXUlH8Jye6wWSQ",
  "symbol": "EURUSD",
  "subscriber": {
    "id": "5013f1322ae00d69167803d959e9f7dc",
    "name": "Bruce Wayne"
  },
  "demo": true,
  "provider": {
    "id": "5013f1322ae00d69167803d959e9f7dc",
    "name": "Clark Kent"
  },
  "strategy": {
    "id": "StMF",
    "name": "Test strategy",
  },
  "positionId": "+apNW3",
  "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,
    "totalLatency": 283
  }
}

Usages#