Functions of DealsHistory
type Deal struct {
ServerURI string `json:"server_uri"` // Filled in locally. URI of the server where the deal was opened (for example: "http://localhost:8080"). If the server is unknown, then "unknown" is used
ServerCode string `json:"server_code"` // Filled in locally? Code of the server where the deal was opened (for example: "mt5_real1")
GroupName string `json:"group_name"` // Group name of the account where the deal was opened
DealID int64 `json:"deal_id"` // Deal ID
OrderID int64 `json:"order_id"` // Order ID
PositionID int64 `json:"position_id"` // Position ID
Login string `json:"login"` // Login of the account (who the deal was opened)
Time int64 `json:"time"` // Time of the deal opening (in seconds)
IsEntry bool `json:"is_entry,omitempty"` // Is entry deal
Action string `json:"action"` // Action of the deal (buy/sell/balance)
Symbol string `json:"symbol"` // Symbol of the deal
Price float64 `json:"price"` // Price of the deal
TP float64 `json:"tp"` // Take profit of the deal
SL float64 `json:"sl"` // Stop loss of the deal
Volume float64 `json:"volume"` // Volume of the deal
Profit float64 `json:"profit"` // Profit of the deal
ProfitRaw float64 `json:"profit_raw"` // Raw profit of the deal
Swap float64 `json:"swap"` // Swap of the deal
Commission float64 `json:"commission"` // Commission of the deal
Fee float64 `json:"fee"` // Fee of the deal
ProfitRate float64 `json:"profit_rate"` // Profit rate of the deal
MarginRate float64 `json:"margin_rate"` // Margin rate of the deal
Comment string `json:"comment"` // Comment of the deal
Balance float64 `json:"balance"` // Balance of the account (at the moment of the deal is got from server)
Equity float64 `json:"equity"` // Equity of the account (at the moment of the deal is got from server)
Floating float64 `json:"floating"` // Floating of the account (at the moment of the deal is got from server)
FreeMargin float64 `json:"free_margin"` // Free margin of the account (at the moment of the deal is got from server)
Margin float64 `json:"margin"` // Margin of the account (at the moment of the deal is got from server)
Credit float64 `json:"credit"` // Credit of the account (at the moment of the deal is got from server)
Leverage float64 `json:"leverage"` // Leverage of the account (at the moment of the deal is got from server)
Gateway string `json:"gateway"` // Gateway If successful, it returns a pointer to the string with the identifier. If the gateway was not involved in the deal execution or no ID is set for the gateway, a zero value is returned.
Reason DealReason `json:"reason"` // Reason of the deal. The reasons for transaction are listed in
Dealer uint64 `json:"dealer"` // Dealer - The login of a dealer, who has processed a deal. If a deal was processed automatically by the server, 0 is returned.
AccountAgent uint64 `json:"agent"` // Agent account number.
AccountIDNumber string `json:"account"` // If successful, it returns a pointer to a string with the account number. Otherwise, it returns an empty string.
Execution Execution `json:"execution"` //
ContractSize float64 `json:"contract_size"` //
CalcMode CalcMode `json:"calc_mode"` //
TsFromMT int64 `json:"time_from_mt"` // Metrics: Time when the deal was received from MT
TsSentNATS int64 `json:"time_sent_nats"` // Metrics: Time when the deal was sent to NATS
TsReceivedDeals int64 `json:"time_received_deals"` // Filled in locally. Metrics: Time when the deal was received from NATS
TsSentDB int64 `json:"time_sent_db"` // Filled in locally. Metrics: Time when the deal was sent to DB
Type DealType `json:"type"` // Type the order, can 0 - for buy and 1 for sale
}value
description
Last updated