Documentation ¶
Index ¶
- Variables
- type AllowedTrades
- func (AllowedTrades) Descriptor() protoreflect.EnumDescriptor
- func (x AllowedTrades) Enum() *AllowedTrades
- func (AllowedTrades) EnumDescriptor() ([]byte, []int)deprecated
- func (enum AllowedTrades) MarshalCSV() (string, error)
- func (enum AllowedTrades) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum AllowedTrades) MarshalJSON() ([]byte, error)
- func (enum AllowedTrades) MarshalYAML() (interface{}, error)
- func (x AllowedTrades) Number() protoreflect.EnumNumber
- func (enum *AllowedTrades) Scan(value interface{}) error
- func (x AllowedTrades) String() string
- func (AllowedTrades) Type() protoreflect.EnumType
- func (enum *AllowedTrades) UnmarshalCSV(raw string) error
- func (enum *AllowedTrades) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *AllowedTrades) UnmarshalJSON(raw []byte) error
- func (enum *AllowedTrades) UnmarshalYAML(value *yaml.Node) error
- func (enum AllowedTrades) Value() (driver.Value, error)
- type Assets
- type Deal
- func (*Deal) Descriptor() ([]byte, []int)deprecated
- func (x *Deal) GetComment() string
- func (x *Deal) GetCommission() *gopb.Decimal
- func (x *Deal) GetEntry() Deal_Entry
- func (x *Deal) GetExternalId() string
- func (x *Deal) GetFee() *gopb.Decimal
- func (x *Deal) GetId() uint64
- func (x *Deal) GetOrderId() uint64
- func (x *Deal) GetOrigination() Deal_Reason
- func (x *Deal) GetPositionId() uint64
- func (x *Deal) GetPrice() *gopb.Decimal
- func (x *Deal) GetProfit() *gopb.Decimal
- func (x *Deal) GetStopLoss() *gopb.Decimal
- func (x *Deal) GetSwap() *gopb.Decimal
- func (x *Deal) GetSymbol() string
- func (x *Deal) GetTakeProfit() *gopb.Decimal
- func (x *Deal) GetTime() *gopb.UnixTimestamp
- func (x *Deal) GetType() Deal_Type
- func (x *Deal) GetVolume() *gopb.Decimal
- func (*Deal) ProtoMessage()
- func (x *Deal) ProtoReflect() protoreflect.Message
- func (x *Deal) Reset()
- func (x *Deal) String() string
- type Deal_Entry
- func (Deal_Entry) Descriptor() protoreflect.EnumDescriptor
- func (x Deal_Entry) Enum() *Deal_Entry
- func (Deal_Entry) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Deal_Entry) MarshalCSV() (string, error)
- func (enum Deal_Entry) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Deal_Entry) MarshalJSON() ([]byte, error)
- func (enum Deal_Entry) MarshalYAML() (interface{}, error)
- func (x Deal_Entry) Number() protoreflect.EnumNumber
- func (enum *Deal_Entry) Scan(value interface{}) error
- func (x Deal_Entry) String() string
- func (Deal_Entry) Type() protoreflect.EnumType
- func (enum *Deal_Entry) UnmarshalCSV(raw string) error
- func (enum *Deal_Entry) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Deal_Entry) UnmarshalJSON(raw []byte) error
- func (enum *Deal_Entry) UnmarshalYAML(value *yaml.Node) error
- func (enum Deal_Entry) Value() (driver.Value, error)
- type Deal_Reason
- func (Deal_Reason) Descriptor() protoreflect.EnumDescriptor
- func (x Deal_Reason) Enum() *Deal_Reason
- func (Deal_Reason) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Deal_Reason) MarshalCSV() (string, error)
- func (enum Deal_Reason) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Deal_Reason) MarshalJSON() ([]byte, error)
- func (enum Deal_Reason) MarshalYAML() (interface{}, error)
- func (x Deal_Reason) Number() protoreflect.EnumNumber
- func (enum *Deal_Reason) Scan(value interface{}) error
- func (x Deal_Reason) String() string
- func (Deal_Reason) Type() protoreflect.EnumType
- func (enum *Deal_Reason) UnmarshalCSV(raw string) error
- func (enum *Deal_Reason) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Deal_Reason) UnmarshalJSON(raw []byte) error
- func (enum *Deal_Reason) UnmarshalYAML(value *yaml.Node) error
- func (enum Deal_Reason) Value() (driver.Value, error)
- type Deal_Type
- func (Deal_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Deal_Type) Enum() *Deal_Type
- func (Deal_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Deal_Type) MarshalCSV() (string, error)
- func (enum Deal_Type) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Deal_Type) MarshalJSON() ([]byte, error)
- func (enum Deal_Type) MarshalYAML() (interface{}, error)
- func (x Deal_Type) Number() protoreflect.EnumNumber
- func (enum *Deal_Type) Scan(value interface{}) error
- func (x Deal_Type) String() string
- func (Deal_Type) Type() protoreflect.EnumType
- func (enum *Deal_Type) UnmarshalCSV(raw string) error
- func (enum *Deal_Type) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Deal_Type) UnmarshalJSON(raw []byte) error
- func (enum *Deal_Type) UnmarshalYAML(value *yaml.Node) error
- func (enum Deal_Type) Value() (driver.Value, error)
- type EnabledResult
- type ExpirationPolicy
- func (ExpirationPolicy) Descriptor() protoreflect.EnumDescriptor
- func (x ExpirationPolicy) Enum() *ExpirationPolicy
- func (ExpirationPolicy) EnumDescriptor() ([]byte, []int)deprecated
- func (enum ExpirationPolicy) MarshalCSV() (string, error)
- func (enum ExpirationPolicy) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum ExpirationPolicy) MarshalJSON() ([]byte, error)
- func (enum ExpirationPolicy) MarshalYAML() (interface{}, error)
- func (x ExpirationPolicy) Number() protoreflect.EnumNumber
- func (enum *ExpirationPolicy) Scan(value interface{}) error
- func (x ExpirationPolicy) String() string
- func (ExpirationPolicy) Type() protoreflect.EnumType
- func (enum *ExpirationPolicy) UnmarshalCSV(raw string) error
- func (enum *ExpirationPolicy) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *ExpirationPolicy) UnmarshalJSON(raw []byte) error
- func (enum *ExpirationPolicy) UnmarshalYAML(value *yaml.Node) error
- func (enum ExpirationPolicy) Value() (driver.Value, error)
- type FillPolicy
- func (FillPolicy) Descriptor() protoreflect.EnumDescriptor
- func (x FillPolicy) Enum() *FillPolicy
- func (FillPolicy) EnumDescriptor() ([]byte, []int)deprecated
- func (enum FillPolicy) MarshalCSV() (string, error)
- func (enum FillPolicy) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum FillPolicy) MarshalJSON() ([]byte, error)
- func (enum FillPolicy) MarshalYAML() (interface{}, error)
- func (x FillPolicy) Number() protoreflect.EnumNumber
- func (enum *FillPolicy) Scan(value interface{}) error
- func (x FillPolicy) String() string
- func (FillPolicy) Type() protoreflect.EnumType
- func (enum *FillPolicy) UnmarshalCSV(raw string) error
- func (enum *FillPolicy) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *FillPolicy) UnmarshalJSON(raw []byte) error
- func (enum *FillPolicy) UnmarshalYAML(value *yaml.Node) error
- func (enum FillPolicy) Value() (driver.Value, error)
- type NameResult
- func (*NameResult) Descriptor() ([]byte, []int)deprecated
- func (x *NameResult) GetAddress() string
- func (x *NameResult) GetId() string
- func (x *NameResult) GetType() string
- func (*NameResult) ProtoMessage()
- func (x *NameResult) ProtoReflect() protoreflect.Message
- func (x *NameResult) Reset()
- func (x *NameResult) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetComment() string
- func (x *Order) GetCurrentVolume() *gopb.Decimal
- func (x *Order) GetDoneTime() *gopb.UnixTimestamp
- func (x *Order) GetExpirationTime() *gopb.UnixTimestamp
- func (x *Order) GetExpirationType() ExpirationPolicy
- func (x *Order) GetExternalId() string
- func (x *Order) GetFillType() FillPolicy
- func (x *Order) GetId() uint64
- func (x *Order) GetInitialVolume() *gopb.Decimal
- func (x *Order) GetOppositePositionId() uint64
- func (x *Order) GetOriginator() Order_Reason
- func (x *Order) GetPositionId() uint64
- func (x *Order) GetPriceOpen() *gopb.Decimal
- func (x *Order) GetSetupTime() *gopb.UnixTimestamp
- func (x *Order) GetStatus() Order_Status
- func (x *Order) GetStopLimit() *gopb.Decimal
- func (x *Order) GetStopLoss() *gopb.Decimal
- func (x *Order) GetSymbol() string
- func (x *Order) GetTakeProfit() *gopb.Decimal
- func (x *Order) GetType() Order_Type
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type Order_Reason
- func (Order_Reason) Descriptor() protoreflect.EnumDescriptor
- func (x Order_Reason) Enum() *Order_Reason
- func (Order_Reason) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Order_Reason) MarshalCSV() (string, error)
- func (enum Order_Reason) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Order_Reason) MarshalJSON() ([]byte, error)
- func (enum Order_Reason) MarshalYAML() (interface{}, error)
- func (x Order_Reason) Number() protoreflect.EnumNumber
- func (enum *Order_Reason) Scan(value interface{}) error
- func (x Order_Reason) String() string
- func (Order_Reason) Type() protoreflect.EnumType
- func (enum *Order_Reason) UnmarshalCSV(raw string) error
- func (enum *Order_Reason) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Order_Reason) UnmarshalJSON(raw []byte) error
- func (enum *Order_Reason) UnmarshalYAML(value *yaml.Node) error
- func (enum Order_Reason) Value() (driver.Value, error)
- type Order_Status
- func (Order_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Order_Status) Enum() *Order_Status
- func (Order_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Order_Status) MarshalCSV() (string, error)
- func (enum Order_Status) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Order_Status) MarshalJSON() ([]byte, error)
- func (enum Order_Status) MarshalYAML() (interface{}, error)
- func (x Order_Status) Number() protoreflect.EnumNumber
- func (enum *Order_Status) Scan(value interface{}) error
- func (x Order_Status) String() string
- func (Order_Status) Type() protoreflect.EnumType
- func (enum *Order_Status) UnmarshalCSV(raw string) error
- func (enum *Order_Status) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Order_Status) UnmarshalJSON(raw []byte) error
- func (enum *Order_Status) UnmarshalYAML(value *yaml.Node) error
- func (enum Order_Status) Value() (driver.Value, error)
- type Order_Type
- func (Order_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Order_Type) Enum() *Order_Type
- func (Order_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Order_Type) MarshalCSV() (string, error)
- func (enum Order_Type) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Order_Type) MarshalJSON() ([]byte, error)
- func (enum Order_Type) MarshalYAML() (interface{}, error)
- func (x Order_Type) Number() protoreflect.EnumNumber
- func (enum *Order_Type) Scan(value interface{}) error
- func (x Order_Type) String() string
- func (Order_Type) Type() protoreflect.EnumType
- func (enum *Order_Type) UnmarshalCSV(raw string) error
- func (enum *Order_Type) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Order_Type) UnmarshalJSON(raw []byte) error
- func (enum *Order_Type) UnmarshalYAML(value *yaml.Node) error
- func (enum Order_Type) Value() (driver.Value, error)
- type Position
- func (*Position) Descriptor() ([]byte, []int)deprecated
- func (x *Position) GetComment() string
- func (x *Position) GetDealIds() []string
- func (x *Position) GetExternalId() string
- func (x *Position) GetId() uint64
- func (x *Position) GetIdentifier() uint64
- func (x *Position) GetOpen() bool
- func (x *Position) GetOpenPrice() *gopb.Decimal
- func (x *Position) GetOpenTime() *gopb.UnixTimestamp
- func (x *Position) GetOrigination() Position_Reason
- func (x *Position) GetProfit() *gopb.Decimal
- func (x *Position) GetStopLoss() *gopb.Decimal
- func (x *Position) GetSwap() *gopb.Decimal
- func (x *Position) GetSymbol() string
- func (x *Position) GetTakeProfit() *gopb.Decimal
- func (x *Position) GetType() Position_Type
- func (x *Position) GetUpdateTime() *gopb.UnixTimestamp
- func (x *Position) GetVolume() *gopb.Decimal
- func (*Position) ProtoMessage()
- func (x *Position) ProtoReflect() protoreflect.Message
- func (x *Position) Reset()
- func (x *Position) String() string
- type Position_Reason
- func (Position_Reason) Descriptor() protoreflect.EnumDescriptor
- func (x Position_Reason) Enum() *Position_Reason
- func (Position_Reason) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Position_Reason) MarshalCSV() (string, error)
- func (enum Position_Reason) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Position_Reason) MarshalJSON() ([]byte, error)
- func (enum Position_Reason) MarshalYAML() (interface{}, error)
- func (x Position_Reason) Number() protoreflect.EnumNumber
- func (enum *Position_Reason) Scan(value interface{}) error
- func (x Position_Reason) String() string
- func (Position_Reason) Type() protoreflect.EnumType
- func (enum *Position_Reason) UnmarshalCSV(raw string) error
- func (enum *Position_Reason) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Position_Reason) UnmarshalJSON(raw []byte) error
- func (enum *Position_Reason) UnmarshalYAML(value *yaml.Node) error
- func (enum Position_Reason) Value() (driver.Value, error)
- type Position_Type
- func (Position_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Position_Type) Enum() *Position_Type
- func (Position_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (enum Position_Type) MarshalCSV() (string, error)
- func (enum Position_Type) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum Position_Type) MarshalJSON() ([]byte, error)
- func (enum Position_Type) MarshalYAML() (interface{}, error)
- func (x Position_Type) Number() protoreflect.EnumNumber
- func (enum *Position_Type) Scan(value interface{}) error
- func (x Position_Type) String() string
- func (Position_Type) Type() protoreflect.EnumType
- func (enum *Position_Type) UnmarshalCSV(raw string) error
- func (enum *Position_Type) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *Position_Type) UnmarshalJSON(raw []byte) error
- func (enum *Position_Type) UnmarshalYAML(value *yaml.Node) error
- func (enum Position_Type) Value() (driver.Value, error)
- type StrategyContext
- func (*StrategyContext) Descriptor() ([]byte, []int)deprecated
- func (x *StrategyContext) GetBars() []*data.Bar
- func (x *StrategyContext) GetCurrentBar() uint64
- func (x *StrategyContext) GetCurrentTime() *gopb.UnixTimestamp
- func (x *StrategyContext) GetDeals() []*Deal
- func (x *StrategyContext) GetHistoricalOrders() []*Order
- func (x *StrategyContext) GetLiquidAssets() *Assets
- func (x *StrategyContext) GetOrders() []*Order
- func (x *StrategyContext) GetPositions() []*Position
- func (x *StrategyContext) GetSymbol() string
- func (*StrategyContext) ProtoMessage()
- func (x *StrategyContext) ProtoReflect() protoreflect.Message
- func (x *StrategyContext) Reset()
- func (x *StrategyContext) String() string
- type TradeRequest
- func (*TradeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TradeRequest) GetAction() TradeRequest_Action
- func (x *TradeRequest) GetComment() string
- func (x *TradeRequest) GetCreatedOn() *gopb.UnixTimestamp
- func (x *TradeRequest) GetDeviation() *gopb.Decimal
- func (x *TradeRequest) GetExpiration() *gopb.UnixDuration
- func (x *TradeRequest) GetExpirationType() ExpirationPolicy
- func (x *TradeRequest) GetFillType() FillPolicy
- func (x *TradeRequest) GetOppositePositionId() uint64
- func (x *TradeRequest) GetOrderId() uint64
- func (x *TradeRequest) GetPositionId() uint64
- func (x *TradeRequest) GetPrice() *gopb.Decimal
- func (x *TradeRequest) GetStopLimit() *gopb.Decimal
- func (x *TradeRequest) GetStopLoss() *gopb.Decimal
- func (x *TradeRequest) GetSymbol() string
- func (x *TradeRequest) GetTakeProfit() *gopb.Decimal
- func (x *TradeRequest) GetType() Order_Type
- func (x *TradeRequest) GetUpdatedOn() *gopb.UnixTimestamp
- func (x *TradeRequest) GetVolume() *gopb.Decimal
- func (*TradeRequest) ProtoMessage()
- func (x *TradeRequest) ProtoReflect() protoreflect.Message
- func (x *TradeRequest) Reset()
- func (x *TradeRequest) String() string
- type TradeRequest_Action
- func (TradeRequest_Action) Descriptor() protoreflect.EnumDescriptor
- func (x TradeRequest_Action) Enum() *TradeRequest_Action
- func (TradeRequest_Action) EnumDescriptor() ([]byte, []int)deprecated
- func (enum TradeRequest_Action) MarshalCSV() (string, error)
- func (enum TradeRequest_Action) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
- func (enum TradeRequest_Action) MarshalJSON() ([]byte, error)
- func (enum TradeRequest_Action) MarshalYAML() (interface{}, error)
- func (x TradeRequest_Action) Number() protoreflect.EnumNumber
- func (enum *TradeRequest_Action) Scan(value interface{}) error
- func (x TradeRequest_Action) String() string
- func (TradeRequest_Action) Type() protoreflect.EnumType
- func (enum *TradeRequest_Action) UnmarshalCSV(raw string) error
- func (enum *TradeRequest_Action) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
- func (enum *TradeRequest_Action) UnmarshalJSON(raw []byte) error
- func (enum *TradeRequest_Action) UnmarshalYAML(value *yaml.Node) error
- func (enum TradeRequest_Action) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
var ( AllowedTrades_name = map[int32]string{ 0: "AllAllowed", 1: "BuysAllowed", 2: "SellsAllowed", } AllowedTrades_value = map[string]int32{ "AllAllowed": 0, "BuysAllowed": 1, "SellsAllowed": 2, } )
Enum value maps for AllowedTrades.
var ( FillPolicy_name = map[int32]string{ 0: "FillOrKill", 1: "ImmediateOrCancel", 2: "Return", } FillPolicy_value = map[string]int32{ "FillOrKill": 0, "ImmediateOrCancel": 1, "Return": 2, } )
Enum value maps for FillPolicy.
var ( ExpirationPolicy_name = map[int32]string{ 0: "UntilCancelled", 1: "Today", 2: "TimeSpecified", 3: "TimeSpecifiedDay", } ExpirationPolicy_value = map[string]int32{ "UntilCancelled": 0, "Today": 1, "TimeSpecified": 2, "TimeSpecifiedDay": 3, } )
Enum value maps for ExpirationPolicy.
var ( Deal_Type_name = map[int32]string{ 0: "Buy", 1: "Sell", 2: "Balance", 3: "Credit", 4: "Charge", 5: "Correction", 6: "Bonus", 7: "Commission", 8: "CommissionDaily", 9: "CommissionMonthly", 10: "CommissionAgentDaily", 11: "CommissionAgentMonthly", 12: "Interest", 13: "BuyCancelled", 14: "SellCancelled", 15: "Dividend", 16: "Franked", 17: "Tax", } Deal_Type_value = map[string]int32{ "Buy": 0, "Sell": 1, "Balance": 2, "Credit": 3, "Charge": 4, "Correction": 5, "Bonus": 6, "Commission": 7, "CommissionDaily": 8, "CommissionMonthly": 9, "CommissionAgentDaily": 10, "CommissionAgentMonthly": 11, "Interest": 12, "BuyCancelled": 13, "SellCancelled": 14, "Dividend": 15, "Franked": 16, "Tax": 17, } )
Enum value maps for Deal_Type.
var ( Deal_Entry_name = map[int32]string{ 0: "In", 1: "Out", 2: "Reverse", 3: "OutBy", } Deal_Entry_value = map[string]int32{ "In": 0, "Out": 1, "Reverse": 2, "OutBy": 3, } )
Enum value maps for Deal_Entry.
var ( Deal_Reason_name = map[int32]string{ 0: "Client", 1: "Mobile", 2: "Web", 3: "Strategy", 4: "StopLoss", 5: "TakeProfit", 6: "StopOut", 7: "Rollover", 8: "Margin", 9: "Split", } Deal_Reason_value = map[string]int32{ "Client": 0, "Mobile": 1, "Web": 2, "Strategy": 3, "StopLoss": 4, "TakeProfit": 5, "StopOut": 6, "Rollover": 7, "Margin": 8, "Split": 9, } )
Enum value maps for Deal_Reason.
var ( Order_Type_name = map[int32]string{ 0: "Buy", 1: "Sell", 2: "BuyLimit", 3: "SellLimit", 4: "BuyStop", 5: "SellStop", 6: "BuyStopLimit", 7: "SellStopLimit", 8: "ClosedBy", } Order_Type_value = map[string]int32{ "Buy": 0, "Sell": 1, "BuyLimit": 2, "SellLimit": 3, "BuyStop": 4, "SellStop": 5, "BuyStopLimit": 6, "SellStopLimit": 7, "ClosedBy": 8, } )
Enum value maps for Order_Type.
var ( Order_Status_name = map[int32]string{ 0: "Started", 1: "Placed", 2: "Cancelled", 3: "Partial", 4: "Filled", 5: "Rejected", 6: "Expired", 7: "RequestAdd", 8: "RequestModify", 9: "RequestCancel", } Order_Status_value = map[string]int32{ "Started": 0, "Placed": 1, "Cancelled": 2, "Partial": 3, "Filled": 4, "Rejected": 5, "Expired": 6, "RequestAdd": 7, "RequestModify": 8, "RequestCancel": 9, } )
Enum value maps for Order_Status.
var ( Order_Reason_name = map[int32]string{ 0: "Client", 1: "Mobile", 2: "Web", 3: "Strategy", 4: "StopLoss", 5: "TakeProfit", 6: "StopOut", } Order_Reason_value = map[string]int32{ "Client": 0, "Mobile": 1, "Web": 2, "Strategy": 3, "StopLoss": 4, "TakeProfit": 5, "StopOut": 6, } )
Enum value maps for Order_Reason.
var ( Position_Type_name = map[int32]string{ 0: "Buy", 1: "Sell", } Position_Type_value = map[string]int32{ "Buy": 0, "Sell": 1, } )
Enum value maps for Position_Type.
var ( Position_Reason_name = map[int32]string{ 0: "Client", 1: "Mobile", 2: "Web", 3: "Strategy", } Position_Reason_value = map[string]int32{ "Client": 0, "Mobile": 1, "Web": 2, "Strategy": 3, } )
Enum value maps for Position_Reason.
var ( TradeRequest_Action_name = map[int32]string{ 0: "Deal", 1: "Pending", 2: "SLTP", 3: "Modify", 4: "Remove", 5: "CloseBy", } TradeRequest_Action_value = map[string]int32{ "Deal": 0, "Pending": 1, "SLTP": 2, "Modify": 3, "Remove": 4, "CloseBy": 5, } )
Enum value maps for TradeRequest_Action.
var AllowedTradesAlternates = map[string]AllowedTrades{ "all": AllowedTrades_AllAllowed, "ALL": AllowedTrades_AllAllowed, "buy": AllowedTrades_BuysAllowed, "BUY": AllowedTrades_BuysAllowed, "sell": AllowedTrades_SellsAllowed, "SELL": AllowedTrades_SellsAllowed, }
AllowedTradesAlternates contains alternate values for the data.AllowedTrades enum
var AllowedTradesMapping = map[AllowedTrades]string{
AllowedTrades_AllAllowed: "ALL",
AllowedTrades_BuysAllowed: "BUY",
AllowedTrades_SellsAllowed: "SELL",
}
AllowedTradesMapping contains alternate names for the data.AllowedTrades enum
var DealEntryAlternates = map[string]Deal_Entry{ "InOut": Deal_Reverse, }
DealEntryAlternates contains alternate values for the data.Deal.Entry enum
var DealReasonAlternates = map[string]Deal_Reason{ "SL": Deal_StopLoss, "TP": Deal_TakeProfit, "SO": Deal_StopOut, }
DealReasonAlternates contains alternate values for the data.Deal.Reason enum
var DealReasonMapping = map[Deal_Reason]string{
Deal_StopLoss: "SL",
Deal_TakeProfit: "TP",
Deal_StopOut: "SO",
}
DealReasonMapping contains alternate names for the data.Deal.Reason enum
var ExpirationPolicyAlternates = map[string]ExpirationPolicy{ "GTC": ExpirationPolicy_UntilCancelled, }
ExpirationPolicyAlternates contains alternate values for the data.ExpirationPolicy enum
var ExpirationPolicyMapping = map[ExpirationPolicy]string{
ExpirationPolicy_UntilCancelled: "GTC",
}
ExpirationPolicyMapping contains alternate names for the data.ExpirationPolicy enum
var File_protos_edge_data_common_proto protoreflect.FileDescriptor
var File_protos_edge_data_context_proto protoreflect.FileDescriptor
var File_protos_edge_data_deal_proto protoreflect.FileDescriptor
var File_protos_edge_data_order_proto protoreflect.FileDescriptor
var File_protos_edge_data_position_proto protoreflect.FileDescriptor
var File_protos_edge_data_trade_proto protoreflect.FileDescriptor
var FillPolicyAlternates = map[string]FillPolicy{ "FOK": FillPolicy_FillOrKill, "IOC": FillPolicy_ImmediateOrCancel, }
FillPolicyAlternates contains alternate values for the data.FillPolicy enum
var FillPolicyMapping = map[FillPolicy]string{
FillPolicy_FillOrKill: "FOK",
FillPolicy_ImmediateOrCancel: "IOC",
}
FillPolicyMapping contains alternate names for the data.FillPolicy enum
var OrderReasonAlternates = map[string]Order_Reason{ "SL": Order_StopLoss, "TP": Order_TakeProfit, "SO": Order_StopOut, }
OrderReasonAlternates contains alternate values for the data.Order.Reason enum
var OrderReasonMapping = map[Order_Reason]string{
Order_StopLoss: "SL",
Order_TakeProfit: "TP",
Order_StopOut: "SO",
}
OrderReasonMapping contains alternate names for the data.Order.Reason enum
Functions ¶
This section is empty.
Types ¶
type AllowedTrades ¶ added in v1.3.4
type AllowedTrades int32
AllowedTrades determines which kind of trades should be allowed by the filter
const ( AllowedTrades_AllAllowed AllowedTrades = 0 // All trading allowed AllowedTrades_BuysAllowed AllowedTrades = 1 // Only buy trades allowed AllowedTrades_SellsAllowed AllowedTrades = 2 // Only sell trades allowed )
func (AllowedTrades) Descriptor ¶ added in v1.3.4
func (AllowedTrades) Descriptor() protoreflect.EnumDescriptor
func (AllowedTrades) Enum ¶ added in v1.3.4
func (x AllowedTrades) Enum() *AllowedTrades
func (AllowedTrades) EnumDescriptor
deprecated
added in
v1.3.4
func (AllowedTrades) EnumDescriptor() ([]byte, []int)
Deprecated: Use AllowedTrades.Descriptor instead.
func (AllowedTrades) MarshalCSV ¶ added in v1.3.4
func (enum AllowedTrades) MarshalCSV() (string, error)
MarshalCSV converts a data.AllowedTrades value to CSV cell value
func (AllowedTrades) MarshalDynamoDBAttributeValue ¶ added in v1.3.4
func (enum AllowedTrades) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.AllowedTrades value to a DynamoDB AttributeValue
func (AllowedTrades) MarshalJSON ¶ added in v1.3.4
func (enum AllowedTrades) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.AllowedTrades value to a JSON value
func (AllowedTrades) MarshalYAML ¶ added in v1.3.4
func (enum AllowedTrades) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.AllowedTrades value to a YAML node value
func (AllowedTrades) Number ¶ added in v1.3.4
func (x AllowedTrades) Number() protoreflect.EnumNumber
func (*AllowedTrades) Scan ¶ added in v1.3.4
func (enum *AllowedTrades) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.AllowedTrades value
func (AllowedTrades) String ¶ added in v1.3.4
func (x AllowedTrades) String() string
func (AllowedTrades) Type ¶ added in v1.3.4
func (AllowedTrades) Type() protoreflect.EnumType
func (*AllowedTrades) UnmarshalCSV ¶ added in v1.3.4
func (enum *AllowedTrades) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.AllowedTrades value
func (*AllowedTrades) UnmarshalDynamoDBAttributeValue ¶ added in v1.3.4
func (enum *AllowedTrades) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.AllowedTrades value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the AllowedTrades value will not be modified.
func (*AllowedTrades) UnmarshalJSON ¶ added in v1.3.4
func (enum *AllowedTrades) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.AllowedTrades value
func (*AllowedTrades) UnmarshalYAML ¶ added in v1.3.4
func (enum *AllowedTrades) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.AllowedTrades value
type Assets ¶
type Assets struct { CashBalance *gopb.Decimal `protobuf:"bytes,1,opt,name=cash_balance,json=cashBalance,proto3" json:"cash_balance,omitempty"` // The current cash balance associated with the strategy // contains filtered or unexported fields }
Assets describes the liquid (fiat) assets to which a strategy has access. This may include hard cash as well as margin
func (*Assets) Descriptor
deprecated
func (*Assets) GetCashBalance ¶
func (*Assets) ProtoMessage ¶
func (*Assets) ProtoMessage()
func (*Assets) ProtoReflect ¶
func (x *Assets) ProtoReflect() protoreflect.Message
type Deal ¶ added in v1.0.1
type Deal struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Deal ID. Unique number assigned to each deal OrderId uint64 `protobuf:"varint,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // Deal order number Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` // Deal symbol ExternalId string `protobuf:"bytes,4,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` // Deal identifier in an external trading system (on the Exchange) Volume *gopb.Decimal `protobuf:"bytes,5,opt,name=volume,proto3" json:"volume,omitempty"` // Deal volume Price *gopb.Decimal `protobuf:"bytes,6,opt,name=price,proto3" json:"price,omitempty"` // Deal price Commission *gopb.Decimal `protobuf:"bytes,7,opt,name=commission,proto3" json:"commission,omitempty"` // Deal commission Swap *gopb.Decimal `protobuf:"bytes,8,opt,name=swap,proto3" json:"swap,omitempty"` // Cumulative swap on close Profit *gopb.Decimal `protobuf:"bytes,9,opt,name=profit,proto3" json:"profit,omitempty"` // Deal profit Fee *gopb.Decimal `protobuf:"bytes,10,opt,name=fee,proto3" json:"fee,omitempty"` // Fee for making a deal charged immediately after performing a deal StopLoss *gopb.Decimal `protobuf:"bytes,11,opt,name=stop_loss,json=stopLoss,proto3" json:"stop_loss,omitempty"` // Stop Loss level. Entry and reversal deals use the Stop Loss values from the original order based on which the position was opened or reversed // Exit deals use the Stop Loss of a position as at the time of position closing TakeProfit *gopb.Decimal `protobuf:"bytes,12,opt,name=take_profit,json=takeProfit,proto3" json:"take_profit,omitempty"` // Take Profit level. Entry and reversal deals use the Take Profit values from the original order based on which the position was opened or reversed // Exit deals use the Take Profit value of a position as at the time of position closing Time *gopb.UnixTimestamp `protobuf:"bytes,13,opt,name=time,proto3" json:"time,omitempty"` // Deal time Type Deal_Type `protobuf:"varint,14,opt,name=type,proto3,enum=protos.edge.data.Deal_Type" json:"type,omitempty"` // Deal type Entry Deal_Entry `protobuf:"varint,15,opt,name=entry,proto3,enum=protos.edge.data.Deal_Entry" json:"entry,omitempty"` // Deal entry - entry in, entry out, reverse Origination Deal_Reason `protobuf:"varint,16,opt,name=origination,proto3,enum=protos.edge.data.Deal_Reason" json:"origination,omitempty"` // The reason or source for deal execution Comment string `protobuf:"bytes,17,opt,name=comment,proto3" json:"comment,omitempty"` // Deal comment PositionId uint64 `protobuf:"varint,18,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` // Identifier of a position, in the opening, modification or closing of which this deal took part. Each position has a unique identifier that is assigned to all deals executed for the symbol // contains filtered or unexported fields }
Deal represents the data generated by the trade system that affects a position. It may be generated when an order is placed, but it could be generated for other reasons as well.
func (*Deal) Descriptor
deprecated
added in
v1.0.1
func (*Deal) GetComment ¶ added in v1.0.1
func (*Deal) GetCommission ¶ added in v1.0.1
func (*Deal) GetEntry ¶ added in v1.0.1
func (x *Deal) GetEntry() Deal_Entry
func (*Deal) GetExternalId ¶ added in v1.0.1
func (*Deal) GetOrderId ¶ added in v1.0.1
func (*Deal) GetOrigination ¶ added in v1.0.1
func (x *Deal) GetOrigination() Deal_Reason
func (*Deal) GetPositionId ¶ added in v1.0.1
func (*Deal) GetStopLoss ¶ added in v1.0.1
func (*Deal) GetTakeProfit ¶ added in v1.0.1
func (*Deal) GetTime ¶ added in v1.0.1
func (x *Deal) GetTime() *gopb.UnixTimestamp
func (*Deal) ProtoMessage ¶ added in v1.0.1
func (*Deal) ProtoMessage()
func (*Deal) ProtoReflect ¶ added in v1.0.1
func (x *Deal) ProtoReflect() protoreflect.Message
type Deal_Entry ¶ added in v1.0.1
type Deal_Entry int32
Entry describes the direction of the deal
const ( Deal_In Deal_Entry = 0 // Entry in Deal_Out Deal_Entry = 1 // Entry out Deal_Reverse Deal_Entry = 2 Deal_OutBy Deal_Entry = 3 // Close a position by an opposite one )
func (Deal_Entry) Descriptor ¶ added in v1.0.1
func (Deal_Entry) Descriptor() protoreflect.EnumDescriptor
func (Deal_Entry) Enum ¶ added in v1.0.1
func (x Deal_Entry) Enum() *Deal_Entry
func (Deal_Entry) EnumDescriptor
deprecated
added in
v1.0.1
func (Deal_Entry) EnumDescriptor() ([]byte, []int)
Deprecated: Use Deal_Entry.Descriptor instead.
func (Deal_Entry) MarshalCSV ¶ added in v1.0.1
func (enum Deal_Entry) MarshalCSV() (string, error)
MarshalCSV converts a data.Deal.Entry value to CSV cell value
func (Deal_Entry) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Deal_Entry) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Deal.Entry value to a DynamoDB AttributeValue
func (Deal_Entry) MarshalJSON ¶ added in v1.0.1
func (enum Deal_Entry) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.Deal.Entry value to a JSON value
func (Deal_Entry) MarshalYAML ¶ added in v1.0.1
func (enum Deal_Entry) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.Deal.Entry value to a YAML node value
func (Deal_Entry) Number ¶ added in v1.0.1
func (x Deal_Entry) Number() protoreflect.EnumNumber
func (*Deal_Entry) Scan ¶ added in v1.0.1
func (enum *Deal_Entry) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.Deal.Entry value
func (Deal_Entry) String ¶ added in v1.0.1
func (x Deal_Entry) String() string
func (Deal_Entry) Type ¶ added in v1.0.1
func (Deal_Entry) Type() protoreflect.EnumType
func (*Deal_Entry) UnmarshalCSV ¶ added in v1.0.1
func (enum *Deal_Entry) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.Deal.Entry value
func (*Deal_Entry) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Deal_Entry) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Deal.Entry value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Deal_Entry value will not be modified.
func (*Deal_Entry) UnmarshalJSON ¶ added in v1.0.1
func (enum *Deal_Entry) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.Deal.Entry value
func (*Deal_Entry) UnmarshalYAML ¶ added in v1.0.1
func (enum *Deal_Entry) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.Deal.Entry value
type Deal_Reason ¶ added in v1.0.1
type Deal_Reason int32
Reason describes the origination of the deal
const ( Deal_Client Deal_Reason = 0 // The deal was executed as a result of activation of an order placed from a desktop terminal Deal_Mobile Deal_Reason = 1 // The deal was executed as a result of activation of an order placed from a mobile application Deal_Web Deal_Reason = 2 // The deal was executed as a result of activation of an order placed from the web platform Deal_Strategy Deal_Reason = 3 // The deal was executed as a result of activation of an order placed from a strategy, i.e. an Expert Advisor or a script Deal_StopLoss Deal_Reason = 4 // The deal was executed as a result of Stop Loss activation Deal_TakeProfit Deal_Reason = 5 // The deal was executed as a result of Take Profit activation Deal_StopOut Deal_Reason = 6 // The deal was executed as a result of the Stop Out event Deal_Rollover Deal_Reason = 7 // The deal was executed due to a rollover Deal_Margin Deal_Reason = 8 // The deal was executed after charging the variation margin Deal_Split Deal_Reason = 9 // The deal was executed after the split (price reduction) of an instrument, which had an open position during split announcement )
func (Deal_Reason) Descriptor ¶ added in v1.0.1
func (Deal_Reason) Descriptor() protoreflect.EnumDescriptor
func (Deal_Reason) Enum ¶ added in v1.0.1
func (x Deal_Reason) Enum() *Deal_Reason
func (Deal_Reason) EnumDescriptor
deprecated
added in
v1.0.1
func (Deal_Reason) EnumDescriptor() ([]byte, []int)
Deprecated: Use Deal_Reason.Descriptor instead.
func (Deal_Reason) MarshalCSV ¶ added in v1.0.1
func (enum Deal_Reason) MarshalCSV() (string, error)
MarshalCSV converts a data.Deal.Reason value to CSV cell value
func (Deal_Reason) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Deal_Reason) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Deal.Reason value to a DynamoDB AttributeValue
func (Deal_Reason) MarshalJSON ¶ added in v1.0.1
func (enum Deal_Reason) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.Deal.Reason value to a JSON value
func (Deal_Reason) MarshalYAML ¶ added in v1.0.1
func (enum Deal_Reason) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.Deal.Reason value to a YAML node value
func (Deal_Reason) Number ¶ added in v1.0.1
func (x Deal_Reason) Number() protoreflect.EnumNumber
func (*Deal_Reason) Scan ¶ added in v1.0.1
func (enum *Deal_Reason) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.Deal.Reason value
func (Deal_Reason) String ¶ added in v1.0.1
func (x Deal_Reason) String() string
func (Deal_Reason) Type ¶ added in v1.0.1
func (Deal_Reason) Type() protoreflect.EnumType
func (*Deal_Reason) UnmarshalCSV ¶ added in v1.0.1
func (enum *Deal_Reason) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.Deal.Reason value
func (*Deal_Reason) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Deal_Reason) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Deal.Reason value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Deal_Reason value will not be modified.
func (*Deal_Reason) UnmarshalJSON ¶ added in v1.0.1
func (enum *Deal_Reason) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.Deal.Reason value
func (*Deal_Reason) UnmarshalYAML ¶ added in v1.0.1
func (enum *Deal_Reason) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.Deal.Reason value
type Deal_Type ¶ added in v1.0.1
type Deal_Type int32
Type describes the type of deal the enum value is associated with
const ( Deal_Buy Deal_Type = 0 Deal_Sell Deal_Type = 1 Deal_Balance Deal_Type = 2 Deal_Credit Deal_Type = 3 Deal_Charge Deal_Type = 4 // Additional charge Deal_Correction Deal_Type = 5 Deal_Bonus Deal_Type = 6 Deal_Commission Deal_Type = 7 // Additional commission Deal_CommissionDaily Deal_Type = 8 // Daily commission Deal_CommissionMonthly Deal_Type = 9 // Monthly commission Deal_CommissionAgentDaily Deal_Type = 10 // Daily agent commission Deal_CommissionAgentMonthly Deal_Type = 11 // Monthly agent commission Deal_Interest Deal_Type = 12 // Interest rate Deal_BuyCancelled Deal_Type = 13 // Canceled buy deal. There can be a situation when a previously executed buy deal is canceled. In this case, the type of the previously executed deal (Buy) is changed to BuyCancelled, // and its profit/loss is zeroized. Previously obtained profit/loss is charged/withdrawn using a separated balance operation Deal_SellCancelled Deal_Type = 14 // Canceled sell deal. There can be a situation when a previously executed sell deal is canceled. In this case, the type of the previously executed deal (Sell) is changed to SellCancelled, // and its profit/loss is zeroized. Previously obtained profit/loss is charged/withdrawn using a separated balance operation Deal_Dividend Deal_Type = 15 // Dividend operations Deal_Franked Deal_Type = 16 // Franked (non-taxable) dividend operations Deal_Tax Deal_Type = 17 // Tax charges )
func (Deal_Type) Descriptor ¶ added in v1.0.1
func (Deal_Type) Descriptor() protoreflect.EnumDescriptor
func (Deal_Type) EnumDescriptor
deprecated
added in
v1.0.1
func (Deal_Type) MarshalCSV ¶ added in v1.0.1
MarshalCSV converts a data.Deal.Type value to CSV cell value
func (Deal_Type) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Deal_Type) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Deal.Type value to a DynamoDB AttributeValue
func (Deal_Type) MarshalJSON ¶ added in v1.0.1
MarshalJSON converts a data.Deal.Type value to a JSON value
func (Deal_Type) MarshalYAML ¶ added in v1.0.1
MarshalYAML converts a data.Deal.Type value to a YAML node value
func (Deal_Type) Number ¶ added in v1.0.1
func (x Deal_Type) Number() protoreflect.EnumNumber
func (*Deal_Type) Scan ¶ added in v1.0.1
Scan attempts to convert an SQL driver value to a new data.Deal.Type value
func (Deal_Type) Type ¶ added in v1.0.1
func (Deal_Type) Type() protoreflect.EnumType
func (*Deal_Type) UnmarshalCSV ¶ added in v1.0.1
UnmarshalCSV attempts to convert a CSV cell value to a new data.Deal.Type value
func (*Deal_Type) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Deal_Type) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Deal.Type value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Deal_Type value will not be modified.
func (*Deal_Type) UnmarshalJSON ¶ added in v1.0.1
UnmarshalJSON attempts to convert a JSON value to a new data.Deal.Type value
func (*Deal_Type) UnmarshalYAML ¶ added in v1.0.1
UnmarshalYAML attempts to convert a YAML node to a new data.Deal.Type value
type EnabledResult ¶ added in v1.3.0
type EnabledResult struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // contains filtered or unexported fields }
EnabledResult contains information resulting from checking whether or not a service is enabled
func (*EnabledResult) Descriptor
deprecated
added in
v1.3.0
func (*EnabledResult) Descriptor() ([]byte, []int)
Deprecated: Use EnabledResult.ProtoReflect.Descriptor instead.
func (*EnabledResult) GetEnabled ¶ added in v1.3.0
func (x *EnabledResult) GetEnabled() bool
func (*EnabledResult) ProtoMessage ¶ added in v1.3.0
func (*EnabledResult) ProtoMessage()
func (*EnabledResult) ProtoReflect ¶ added in v1.3.0
func (x *EnabledResult) ProtoReflect() protoreflect.Message
func (*EnabledResult) Reset ¶ added in v1.3.0
func (x *EnabledResult) Reset()
func (*EnabledResult) String ¶ added in v1.3.0
func (x *EnabledResult) String() string
type ExpirationPolicy ¶
type ExpirationPolicy int32
ExpirationPolicy describes the order validity period, after which it may be cancelled
const ( ExpirationPolicy_UntilCancelled ExpirationPolicy = 0 // Good till cancel order ExpirationPolicy_Today ExpirationPolicy = 1 // Good till current trade day order ExpirationPolicy_TimeSpecified ExpirationPolicy = 2 // Good till expired order ExpirationPolicy_TimeSpecifiedDay ExpirationPolicy = 3 // The order will be effective till 23:59:59 of the specified day. If this time is outside a trading session, the order expires in the nearest trading time. )
func (ExpirationPolicy) Descriptor ¶
func (ExpirationPolicy) Descriptor() protoreflect.EnumDescriptor
func (ExpirationPolicy) Enum ¶
func (x ExpirationPolicy) Enum() *ExpirationPolicy
func (ExpirationPolicy) EnumDescriptor
deprecated
func (ExpirationPolicy) EnumDescriptor() ([]byte, []int)
Deprecated: Use ExpirationPolicy.Descriptor instead.
func (ExpirationPolicy) MarshalCSV ¶ added in v1.0.1
func (enum ExpirationPolicy) MarshalCSV() (string, error)
MarshalCSV converts a data.ExpirationPolicy value to CSV cell value
func (ExpirationPolicy) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum ExpirationPolicy) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.ExpirationPolicy value to a DynamoDB AttributeValue
func (ExpirationPolicy) MarshalJSON ¶ added in v1.0.1
func (enum ExpirationPolicy) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.ExpirationPolicy value to a JSON value
func (ExpirationPolicy) MarshalYAML ¶ added in v1.0.1
func (enum ExpirationPolicy) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.ExpirationPolicy value to a YAML node value
func (ExpirationPolicy) Number ¶
func (x ExpirationPolicy) Number() protoreflect.EnumNumber
func (*ExpirationPolicy) Scan ¶ added in v1.0.1
func (enum *ExpirationPolicy) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.ExpirationPolicy value
func (ExpirationPolicy) String ¶
func (x ExpirationPolicy) String() string
func (ExpirationPolicy) Type ¶
func (ExpirationPolicy) Type() protoreflect.EnumType
func (*ExpirationPolicy) UnmarshalCSV ¶ added in v1.0.1
func (enum *ExpirationPolicy) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.ExpirationPolicy value
func (*ExpirationPolicy) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *ExpirationPolicy) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.ExpirationPolicy value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the ExpirationPolicy value will not be modified.
func (*ExpirationPolicy) UnmarshalJSON ¶ added in v1.0.1
func (enum *ExpirationPolicy) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.ExpirationPolicy value
func (*ExpirationPolicy) UnmarshalYAML ¶ added in v1.0.1
func (enum *ExpirationPolicy) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.ExpirationPolicy value
type FillPolicy ¶
type FillPolicy int32
FillPolicy describes how the volume of an order will be filled
const ( FillPolicy_FillOrKill FillPolicy = 0 // An order can be executed in the specified volume only. // If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed. // The desired volume can be made up of several available offers. // The possibility of using FOK orders is determined at the trade server. FillPolicy_ImmediateOrCancel FillPolicy = 1 // A trader agrees to execute a deal with the volume maximally available in the market within that indicated in the order. // If the request cannot be filled completely, an order with the available volume will be executed, and the remaining volume will be canceled. // The possibility of using IOC orders is determined at the trade server. FillPolicy_Return FillPolicy = 2 // In case of partial filling, an order with remaining volume is not canceled but processed further. )
func (FillPolicy) Descriptor ¶
func (FillPolicy) Descriptor() protoreflect.EnumDescriptor
func (FillPolicy) Enum ¶
func (x FillPolicy) Enum() *FillPolicy
func (FillPolicy) EnumDescriptor
deprecated
func (FillPolicy) EnumDescriptor() ([]byte, []int)
Deprecated: Use FillPolicy.Descriptor instead.
func (FillPolicy) MarshalCSV ¶ added in v1.0.1
func (enum FillPolicy) MarshalCSV() (string, error)
MarshalCSV converts a data.FillPolicy value to CSV cell value
func (FillPolicy) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum FillPolicy) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.FillPolicy value to a DynamoDB AttributeValue
func (FillPolicy) MarshalJSON ¶ added in v1.0.1
func (enum FillPolicy) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.FillPolicy value to a JSON value
func (FillPolicy) MarshalYAML ¶ added in v1.0.1
func (enum FillPolicy) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.FillPolicy value to a YAML node value
func (FillPolicy) Number ¶
func (x FillPolicy) Number() protoreflect.EnumNumber
func (*FillPolicy) Scan ¶ added in v1.0.1
func (enum *FillPolicy) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.FillPolicy value
func (FillPolicy) String ¶
func (x FillPolicy) String() string
func (FillPolicy) Type ¶
func (FillPolicy) Type() protoreflect.EnumType
func (*FillPolicy) UnmarshalCSV ¶ added in v1.0.1
func (enum *FillPolicy) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.FillPolicy value
func (*FillPolicy) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *FillPolicy) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.FillPolicy value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the FillPolicy value will not be modified.
func (*FillPolicy) UnmarshalJSON ¶ added in v1.0.1
func (enum *FillPolicy) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.FillPolicy value
func (*FillPolicy) UnmarshalYAML ¶ added in v1.0.1
func (enum *FillPolicy) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.FillPolicy value
type NameResult ¶
type NameResult struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
NameResult contains information uniquely identifying a CLI edge process that is currently running. This information will be used to distinguish between processes of the same type
func (*NameResult) Descriptor
deprecated
func (*NameResult) Descriptor() ([]byte, []int)
Deprecated: Use NameResult.ProtoReflect.Descriptor instead.
func (*NameResult) GetAddress ¶
func (x *NameResult) GetAddress() string
func (*NameResult) GetId ¶
func (x *NameResult) GetId() string
func (*NameResult) GetType ¶
func (x *NameResult) GetType() string
func (*NameResult) ProtoMessage ¶
func (*NameResult) ProtoMessage()
func (*NameResult) ProtoReflect ¶
func (x *NameResult) ProtoReflect() protoreflect.Message
func (*NameResult) Reset ¶
func (x *NameResult) Reset()
func (*NameResult) String ¶
func (x *NameResult) String() string
type Order ¶
type Order struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Order ticket. Unique number assigned to each order Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` // Symbol of the order ExternalId string `protobuf:"bytes,3,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` // Order identifier in an external trading system (on the Exchange) SetupTime *gopb.UnixTimestamp `protobuf:"bytes,4,opt,name=setup_time,json=setupTime,proto3" json:"setup_time,omitempty"` // Order setup time Type Order_Type `protobuf:"varint,5,opt,name=type,proto3,enum=protos.edge.data.Order_Type" json:"type,omitempty"` // Order type Status Order_Status `protobuf:"varint,6,opt,name=status,proto3,enum=protos.edge.data.Order_Status" json:"status,omitempty"` // Order state InitialVolume *gopb.Decimal `protobuf:"bytes,7,opt,name=initial_volume,json=initialVolume,proto3" json:"initial_volume,omitempty"` // Order initial volume CurrentVolume *gopb.Decimal `protobuf:"bytes,8,opt,name=current_volume,json=currentVolume,proto3" json:"current_volume,omitempty"` // Order current volume PriceOpen *gopb.Decimal `protobuf:"bytes,9,opt,name=price_open,json=priceOpen,proto3" json:"price_open,omitempty"` // Price specified in the order StopLoss *gopb.Decimal `protobuf:"bytes,10,opt,name=stop_loss,json=stopLoss,proto3" json:"stop_loss,omitempty"` // Stop Loss value TakeProfit *gopb.Decimal `protobuf:"bytes,11,opt,name=take_profit,json=takeProfit,proto3" json:"take_profit,omitempty"` // Take Profit value StopLimit *gopb.Decimal `protobuf:"bytes,12,opt,name=stop_limit,json=stopLimit,proto3" json:"stop_limit,omitempty"` // The Limit order price for the StopLimit order ExpirationTime *gopb.UnixTimestamp `protobuf:"bytes,13,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` // Order expiration time DoneTime *gopb.UnixTimestamp `protobuf:"bytes,14,opt,name=done_time,json=doneTime,proto3" json:"done_time,omitempty"` // Order execution or cancellation time FillType FillPolicy `protobuf:"varint,15,opt,name=fill_type,json=fillType,proto3,enum=protos.edge.data.FillPolicy" json:"fill_type,omitempty"` // Order filling type ExpirationType ExpirationPolicy `` // Order lifetime /* 144-byte string literal not displayed */ Originator Order_Reason `protobuf:"varint,17,opt,name=originator,proto3,enum=protos.edge.data.Order_Reason" json:"originator,omitempty"` // The reason or source for placing an order Comment string `protobuf:"bytes,18,opt,name=comment,proto3" json:"comment,omitempty"` // Order comment PositionId uint64 `protobuf:"varint,19,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` // Position identifier that is set to an order as soon as it is executed. Each executed order results in a deal that opens or modifies an already existing position. The identifier of exactly this position // is set to the executed order at this moment. OppositePositionId uint64 `protobuf:"varint,20,opt,name=opposite_position_id,json=oppositePositionId,proto3" json:"opposite_position_id,omitempty"` // Identifier of an opposite position used for closing by order OrderType.ClosedBy // contains filtered or unexported fields }
Order contains the data after a trade request is sent to the trading system. Some of this data is generated from the trade request and some is populated by the trading system. A successfully placed order always results in a deal
func (*Order) Descriptor
deprecated
func (*Order) GetComment ¶
func (*Order) GetCurrentVolume ¶
func (*Order) GetDoneTime ¶
func (x *Order) GetDoneTime() *gopb.UnixTimestamp
func (*Order) GetExpirationTime ¶
func (x *Order) GetExpirationTime() *gopb.UnixTimestamp
func (*Order) GetExpirationType ¶
func (x *Order) GetExpirationType() ExpirationPolicy
func (*Order) GetExternalId ¶
func (*Order) GetFillType ¶
func (x *Order) GetFillType() FillPolicy
func (*Order) GetInitialVolume ¶
func (*Order) GetOppositePositionId ¶
func (*Order) GetOriginator ¶
func (x *Order) GetOriginator() Order_Reason
func (*Order) GetPositionId ¶
func (*Order) GetPriceOpen ¶
func (*Order) GetSetupTime ¶
func (x *Order) GetSetupTime() *gopb.UnixTimestamp
func (*Order) GetStatus ¶
func (x *Order) GetStatus() Order_Status
func (*Order) GetStopLimit ¶
func (*Order) GetStopLoss ¶
func (*Order) GetTakeProfit ¶
func (*Order) GetType ¶
func (x *Order) GetType() Order_Type
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type Order_Reason ¶
type Order_Reason int32
Reason describes the originator of the order
const ( Order_Client Order_Reason = 0 // The order was placed from a desktop terminal Order_Mobile Order_Reason = 1 // The order was placed from a mobile application Order_Web Order_Reason = 2 // The order was placed from a web platform Order_Strategy Order_Reason = 3 // The order was placed from a strategy, i.e. by an Expert Advisor or a script Order_StopLoss Order_Reason = 4 // The order was placed as a result of Stop Loss activation Order_TakeProfit Order_Reason = 5 // The order was placed as a result of Take Profit activation Order_StopOut Order_Reason = 6 // The order was placed as a result of the Stop Out event )
func (Order_Reason) Descriptor ¶
func (Order_Reason) Descriptor() protoreflect.EnumDescriptor
func (Order_Reason) Enum ¶
func (x Order_Reason) Enum() *Order_Reason
func (Order_Reason) EnumDescriptor
deprecated
func (Order_Reason) EnumDescriptor() ([]byte, []int)
Deprecated: Use Order_Reason.Descriptor instead.
func (Order_Reason) MarshalCSV ¶ added in v1.0.1
func (enum Order_Reason) MarshalCSV() (string, error)
MarshalCSV converts a data.Order.Reason value to CSV cell value
func (Order_Reason) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Order_Reason) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Order.Reason value to a DynamoDB AttributeValue
func (Order_Reason) MarshalJSON ¶ added in v1.0.1
func (enum Order_Reason) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.Order.Reason value to a JSON value
func (Order_Reason) MarshalYAML ¶ added in v1.0.1
func (enum Order_Reason) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.Order.Reason value to a YAML node value
func (Order_Reason) Number ¶
func (x Order_Reason) Number() protoreflect.EnumNumber
func (*Order_Reason) Scan ¶ added in v1.0.1
func (enum *Order_Reason) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.Order.Reason value
func (Order_Reason) String ¶
func (x Order_Reason) String() string
func (Order_Reason) Type ¶
func (Order_Reason) Type() protoreflect.EnumType
func (*Order_Reason) UnmarshalCSV ¶ added in v1.0.1
func (enum *Order_Reason) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.Order.Reason value
func (*Order_Reason) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Order_Reason) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Order.Reason value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Order_Reason value will not be modified.
func (*Order_Reason) UnmarshalJSON ¶ added in v1.0.1
func (enum *Order_Reason) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.Order.Reason value
func (*Order_Reason) UnmarshalYAML ¶ added in v1.0.1
func (enum *Order_Reason) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.Order.Reason value
type Order_Status ¶
type Order_Status int32
Status describes the current state of the order it is associated with
const ( Order_Started Order_Status = 0 // Order checked, but not yet accepted by broker Order_Placed Order_Status = 1 // Order accepted Order_Cancelled Order_Status = 2 // Order canceled by client Order_Partial Order_Status = 3 // Order partially executed Order_Filled Order_Status = 4 // Order fully executed Order_Rejected Order_Status = 5 // Order rejected Order_Expired Order_Status = 6 // Order expired Order_RequestAdd Order_Status = 7 // Order is being registered (placing to the trading system) Order_RequestModify Order_Status = 8 // Order is being modified (changing its parameters) Order_RequestCancel Order_Status = 9 // Order is being deleted (deleting from the trading system) )
func (Order_Status) Descriptor ¶
func (Order_Status) Descriptor() protoreflect.EnumDescriptor
func (Order_Status) Enum ¶
func (x Order_Status) Enum() *Order_Status
func (Order_Status) EnumDescriptor
deprecated
func (Order_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Order_Status.Descriptor instead.
func (Order_Status) MarshalCSV ¶ added in v1.0.1
func (enum Order_Status) MarshalCSV() (string, error)
MarshalCSV converts a data.Order.Status value to CSV cell value
func (Order_Status) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Order_Status) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Order.Status value to a DynamoDB AttributeValue
func (Order_Status) MarshalJSON ¶ added in v1.0.1
func (enum Order_Status) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.Order.Status value to a JSON value
func (Order_Status) MarshalYAML ¶ added in v1.0.1
func (enum Order_Status) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.Order.Status value to a YAML node value
func (Order_Status) Number ¶
func (x Order_Status) Number() protoreflect.EnumNumber
func (*Order_Status) Scan ¶ added in v1.0.1
func (enum *Order_Status) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.Order.Status value
func (Order_Status) String ¶
func (x Order_Status) String() string
func (Order_Status) Type ¶
func (Order_Status) Type() protoreflect.EnumType
func (*Order_Status) UnmarshalCSV ¶ added in v1.0.1
func (enum *Order_Status) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.Order.Status value
func (*Order_Status) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Order_Status) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Order.Status value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Order_Status value will not be modified.
func (*Order_Status) UnmarshalJSON ¶ added in v1.0.1
func (enum *Order_Status) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.Order.Status value
func (*Order_Status) UnmarshalYAML ¶ added in v1.0.1
func (enum *Order_Status) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.Order.Status value
type Order_Type ¶
type Order_Type int32
Type describes the order type, which is required by some trade request operations
const ( Order_Buy Order_Type = 0 // Market Buy order Order_Sell Order_Type = 1 // Market Sell order Order_BuyLimit Order_Type = 2 // Buy Limit pending order Order_SellLimit Order_Type = 3 // Sell Limit pending order Order_BuyStop Order_Type = 4 // Buy Stop pending order Order_SellStop Order_Type = 5 // Sell Stop pending order Order_BuyStopLimit Order_Type = 6 // Upon reaching the order price, a pending buy-limit order is placed at the StopLimit price Order_SellStopLimit Order_Type = 7 // Upon reaching the order price, a pending sell-limit order is placed at the StopLimit price Order_ClosedBy Order_Type = 8 // Order to close a position by an opposite one )
func (Order_Type) Descriptor ¶
func (Order_Type) Descriptor() protoreflect.EnumDescriptor
func (Order_Type) Enum ¶
func (x Order_Type) Enum() *Order_Type
func (Order_Type) EnumDescriptor
deprecated
func (Order_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Order_Type.Descriptor instead.
func (Order_Type) MarshalCSV ¶ added in v1.0.1
func (enum Order_Type) MarshalCSV() (string, error)
MarshalCSV converts a data.Order.Type value to CSV cell value
func (Order_Type) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Order_Type) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Order.Type value to a DynamoDB AttributeValue
func (Order_Type) MarshalJSON ¶ added in v1.0.1
func (enum Order_Type) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.Order.Type value to a JSON value
func (Order_Type) MarshalYAML ¶ added in v1.0.1
func (enum Order_Type) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.Order.Type value to a YAML node value
func (Order_Type) Number ¶
func (x Order_Type) Number() protoreflect.EnumNumber
func (*Order_Type) Scan ¶ added in v1.0.1
func (enum *Order_Type) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.Order.Type value
func (Order_Type) String ¶
func (x Order_Type) String() string
func (Order_Type) Type ¶
func (Order_Type) Type() protoreflect.EnumType
func (*Order_Type) UnmarshalCSV ¶ added in v1.0.1
func (enum *Order_Type) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.Order.Type value
func (*Order_Type) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Order_Type) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Order.Type value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Order_Type value will not be modified.
func (*Order_Type) UnmarshalJSON ¶ added in v1.0.1
func (enum *Order_Type) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.Order.Type value
func (*Order_Type) UnmarshalYAML ¶ added in v1.0.1
func (enum *Order_Type) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.Order.Type value
type Position ¶
type Position struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Position ID. Unique number assigned to each newly opened position. It usually matches the ID of the order used to open the position except when the ID is changed as a result of service // operations on the server, for example, when charging swaps with position re-opening. This value corresponds to Trade.position. Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` // Symbol of the position ExternalId string `protobuf:"bytes,3,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` // Position identifier in an external trading system (on the Exchange) Volume *gopb.Decimal `protobuf:"bytes,4,opt,name=volume,proto3" json:"volume,omitempty"` // Position volume OpenPrice *gopb.Decimal `protobuf:"bytes,5,opt,name=open_price,json=openPrice,proto3" json:"open_price,omitempty"` // Position open price StopLoss *gopb.Decimal `protobuf:"bytes,6,opt,name=stop_loss,json=stopLoss,proto3" json:"stop_loss,omitempty"` // Stop Loss level of opened position TakeProfit *gopb.Decimal `protobuf:"bytes,7,opt,name=take_profit,json=takeProfit,proto3" json:"take_profit,omitempty"` // Take Profit level of opened position Swap *gopb.Decimal `protobuf:"bytes,8,opt,name=swap,proto3" json:"swap,omitempty"` // Cumulative swap Profit *gopb.Decimal `protobuf:"bytes,9,opt,name=profit,proto3" json:"profit,omitempty"` // Current profit OpenTime *gopb.UnixTimestamp `protobuf:"bytes,10,opt,name=open_time,json=openTime,proto3" json:"open_time,omitempty"` // Position open time UpdateTime *gopb.UnixTimestamp `protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // Position changing time Type Position_Type `protobuf:"varint,12,opt,name=type,proto3,enum=protos.edge.data.Position_Type" json:"type,omitempty"` // Position type Open bool `protobuf:"varint,13,opt,name=open,proto3" json:"open,omitempty"` // True if the position is open, false if it is closed Identifier uint64 `protobuf:"varint,14,opt,name=identifier,proto3" json:"identifier,omitempty"` // Position identifier is a unique number assigned to each re-opened position. It does not change throughout its life cycle and corresponds to the ID of an order used to open a position. // Position identifier is specified in each order (position_id) and deal (position_id) used to open, modify, or close it. Use this property to search for orders and deals related to the position. // When reversing a position in netting mode (using a single in/out trade), identifier does not change. However, ID is replaced with the ID of the order that led to the reversal. // Position reversal is not provided in hedging mode. DealIds []string `protobuf:"bytes,15,rep,name=deal_ids,json=dealIds,proto3" json:"deal_ids,omitempty"` // The IDs of all deals associated with this position Origination Position_Reason `protobuf:"varint,16,opt,name=origination,proto3,enum=protos.edge.data.Position_Reason" json:"origination,omitempty"` // The reason for opening a position Comment string `protobuf:"bytes,17,opt,name=comment,proto3" json:"comment,omitempty"` // Position comment // contains filtered or unexported fields }
Position describes the act of holding some security and the cumulative affects of this. It is created when an order is accepted from a trade request. The position may be modified by additional orders, modifications to the original order, and eventually closed by an order.
func (*Position) Descriptor
deprecated
func (*Position) GetComment ¶
func (*Position) GetDealIds ¶
func (*Position) GetExternalId ¶
func (*Position) GetIdentifier ¶
func (*Position) GetOpenPrice ¶
func (*Position) GetOpenTime ¶
func (x *Position) GetOpenTime() *gopb.UnixTimestamp
func (*Position) GetOrigination ¶
func (x *Position) GetOrigination() Position_Reason
func (*Position) GetStopLoss ¶
func (*Position) GetTakeProfit ¶
func (*Position) GetType ¶
func (x *Position) GetType() Position_Type
func (*Position) GetUpdateTime ¶
func (x *Position) GetUpdateTime() *gopb.UnixTimestamp
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) ProtoReflect ¶
func (x *Position) ProtoReflect() protoreflect.Message
type Position_Reason ¶
type Position_Reason int32
Reason describes the originator of the position
const ( Position_Client Position_Reason = 0 // The position was opened as a result of activation of an order placed from a desktop terminal Position_Mobile Position_Reason = 1 // The position was opened as a result of activation of an order placed from a mobile application Position_Web Position_Reason = 2 // The position was opened as a result of activation of an order placed from the web platform Position_Strategy Position_Reason = 3 // The position was opened as a result of activation of an order placed from a strategy, i.e. an Expert Advisor or a script )
func (Position_Reason) Descriptor ¶
func (Position_Reason) Descriptor() protoreflect.EnumDescriptor
func (Position_Reason) Enum ¶
func (x Position_Reason) Enum() *Position_Reason
func (Position_Reason) EnumDescriptor
deprecated
func (Position_Reason) EnumDescriptor() ([]byte, []int)
Deprecated: Use Position_Reason.Descriptor instead.
func (Position_Reason) MarshalCSV ¶ added in v1.0.1
func (enum Position_Reason) MarshalCSV() (string, error)
MarshalCSV converts a data.Position.Reason value to CSV cell value
func (Position_Reason) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Position_Reason) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Position.Reason value to a DynamoDB AttributeValue
func (Position_Reason) MarshalJSON ¶ added in v1.0.1
func (enum Position_Reason) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.Position.Reason value to a JSON value
func (Position_Reason) MarshalYAML ¶ added in v1.0.1
func (enum Position_Reason) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.Position.Reason value to a YAML node value
func (Position_Reason) Number ¶
func (x Position_Reason) Number() protoreflect.EnumNumber
func (*Position_Reason) Scan ¶ added in v1.0.1
func (enum *Position_Reason) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.Position.Reason value
func (Position_Reason) String ¶
func (x Position_Reason) String() string
func (Position_Reason) Type ¶
func (Position_Reason) Type() protoreflect.EnumType
func (*Position_Reason) UnmarshalCSV ¶ added in v1.0.1
func (enum *Position_Reason) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.Position.Reason value
func (*Position_Reason) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Position_Reason) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Position.Reason value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Position_Reason value will not be modified.
func (*Position_Reason) UnmarshalJSON ¶ added in v1.0.1
func (enum *Position_Reason) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.Position.Reason value
func (*Position_Reason) UnmarshalYAML ¶ added in v1.0.1
func (enum *Position_Reason) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.Position.Reason value
type Position_Type ¶
type Position_Type int32
Type describes the position type
const ( Position_Buy Position_Type = 0 Position_Sell Position_Type = 1 )
func (Position_Type) Descriptor ¶
func (Position_Type) Descriptor() protoreflect.EnumDescriptor
func (Position_Type) Enum ¶
func (x Position_Type) Enum() *Position_Type
func (Position_Type) EnumDescriptor
deprecated
func (Position_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Position_Type.Descriptor instead.
func (Position_Type) MarshalCSV ¶ added in v1.0.1
func (enum Position_Type) MarshalCSV() (string, error)
MarshalCSV converts a data.Position.Type value to CSV cell value
func (Position_Type) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum Position_Type) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.Position.Type value to a DynamoDB AttributeValue
func (Position_Type) MarshalJSON ¶ added in v1.0.1
func (enum Position_Type) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.Position.Type value to a JSON value
func (Position_Type) MarshalYAML ¶ added in v1.0.1
func (enum Position_Type) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.Position.Type value to a YAML node value
func (Position_Type) Number ¶
func (x Position_Type) Number() protoreflect.EnumNumber
func (*Position_Type) Scan ¶ added in v1.0.1
func (enum *Position_Type) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.Position.Type value
func (Position_Type) String ¶
func (x Position_Type) String() string
func (Position_Type) Type ¶
func (Position_Type) Type() protoreflect.EnumType
func (*Position_Type) UnmarshalCSV ¶ added in v1.0.1
func (enum *Position_Type) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.Position.Type value
func (*Position_Type) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *Position_Type) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.Position.Type value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the Position_Type value will not be modified.
func (*Position_Type) UnmarshalJSON ¶ added in v1.0.1
func (enum *Position_Type) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.Position.Type value
func (*Position_Type) UnmarshalYAML ¶ added in v1.0.1
func (enum *Position_Type) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.Position.Type value
type StrategyContext ¶
type StrategyContext struct { Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` // The symbol of the asset being traded CurrentBar uint64 `protobuf:"varint,2,opt,name=current_bar,json=currentBar,proto3" json:"current_bar,omitempty"` // The index of the current bar being operated on for this strategy CurrentTime *gopb.UnixTimestamp `protobuf:"bytes,3,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"` // The current tick for the strategy Bars []*data.Bar `protobuf:"bytes,4,rep,name=bars,proto3" json:"bars,omitempty"` // The OHLC data that has been accumulated so far by the strategy. This may be windowed or cached LiquidAssets *Assets `protobuf:"bytes,5,opt,name=liquid_assets,json=liquidAssets,proto3" json:"liquid_assets,omitempty"` // The liquid assets to which the strategy has access Orders []*Order `protobuf:"bytes,6,rep,name=orders,proto3" json:"orders,omitempty"` // A list of pending orders in reverse order of generation HistoricalOrders []*Order `protobuf:"bytes,7,rep,name=historical_orders,json=historicalOrders,proto3" json:"historical_orders,omitempty"` // A list of orders that are not currently active Positions []*Position `protobuf:"bytes,8,rep,name=positions,proto3" json:"positions,omitempty"` // A list of positions in reverse order of generation Deals []*Deal `protobuf:"bytes,9,rep,name=deals,proto3" json:"deals,omitempty"` // A list of deals in reverse order of generation // contains filtered or unexported fields }
StrategyContext describes the current state of the strategy, allowing for individual components to have a standardized view of what is going on within the trading system.
func (*StrategyContext) Descriptor
deprecated
func (*StrategyContext) Descriptor() ([]byte, []int)
Deprecated: Use StrategyContext.ProtoReflect.Descriptor instead.
func (*StrategyContext) GetBars ¶
func (x *StrategyContext) GetBars() []*data.Bar
func (*StrategyContext) GetCurrentBar ¶ added in v1.3.5
func (x *StrategyContext) GetCurrentBar() uint64
func (*StrategyContext) GetCurrentTime ¶
func (x *StrategyContext) GetCurrentTime() *gopb.UnixTimestamp
func (*StrategyContext) GetDeals ¶ added in v1.0.1
func (x *StrategyContext) GetDeals() []*Deal
func (*StrategyContext) GetHistoricalOrders ¶ added in v1.3.5
func (x *StrategyContext) GetHistoricalOrders() []*Order
func (*StrategyContext) GetLiquidAssets ¶
func (x *StrategyContext) GetLiquidAssets() *Assets
func (*StrategyContext) GetOrders ¶
func (x *StrategyContext) GetOrders() []*Order
func (*StrategyContext) GetPositions ¶
func (x *StrategyContext) GetPositions() []*Position
func (*StrategyContext) GetSymbol ¶ added in v1.1.2
func (x *StrategyContext) GetSymbol() string
func (*StrategyContext) ProtoMessage ¶
func (*StrategyContext) ProtoMessage()
func (*StrategyContext) ProtoReflect ¶
func (x *StrategyContext) ProtoReflect() protoreflect.Message
func (*StrategyContext) Reset ¶
func (x *StrategyContext) Reset()
func (*StrategyContext) String ¶
func (x *StrategyContext) String() string
type TradeRequest ¶
type TradeRequest struct { Action TradeRequest_Action `protobuf:"varint,1,opt,name=action,proto3,enum=protos.edge.data.TradeRequest_Action" json:"action,omitempty"` // Trade operation type OrderId uint64 `protobuf:"varint,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // Order ID. It is used for modifying pending orders. Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` // Symbol of the order. It is not necessary for order modification and position close operations. Volume *gopb.Decimal `protobuf:"bytes,4,opt,name=volume,proto3" json:"volume,omitempty"` // Requested order volume in lots. Note that the real volume of a deal will depend on the order execution type. Price *gopb.Decimal `protobuf:"bytes,5,opt,name=price,proto3" json:"price,omitempty"` // Price, reaching which the order must be executed. Market orders of symbols, whose execution type is "Market Execution", of OrderAction.Deal type, do not require specification of price. StopLimit *gopb.Decimal `protobuf:"bytes,6,opt,name=stop_limit,json=stopLimit,proto3" json:"stop_limit,omitempty"` // The price value, at which the Limit pending order will be placed, when price reaches the price value (this condition is obligatory). Until then the pending order is not placed. StopLoss *gopb.Decimal `protobuf:"bytes,7,opt,name=stop_loss,json=stopLoss,proto3" json:"stop_loss,omitempty"` // Stop Loss price in case of the unfavorable price movement TakeProfit *gopb.Decimal `protobuf:"bytes,8,opt,name=take_profit,json=takeProfit,proto3" json:"take_profit,omitempty"` // Take Profit price in the case of the favorable price movement Deviation *gopb.Decimal `protobuf:"bytes,9,opt,name=deviation,proto3" json:"deviation,omitempty"` // The maximal price deviation Type Order_Type `protobuf:"varint,10,opt,name=type,proto3,enum=protos.edge.data.Order_Type" json:"type,omitempty"` // Order type. Can be one of the OrderType enumeration values. FillType FillPolicy `protobuf:"varint,11,opt,name=fill_type,json=fillType,proto3,enum=protos.edge.data.FillPolicy" json:"fill_type,omitempty"` // Order execution type. Can be one of the enumeration FillPolicy values. ExpirationType ExpirationPolicy `` // Order expiration type. Can be one of the enumeration ExpirationPolicy values. /* 144-byte string literal not displayed */ Expiration *gopb.UnixDuration `protobuf:"bytes,13,opt,name=expiration,proto3" json:"expiration,omitempty"` // Order expiration time (for orders of ExpirationPolicy.TimeSpecified type) Comment string `protobuf:"bytes,14,opt,name=comment,proto3" json:"comment,omitempty"` // Order comment PositionId uint64 `protobuf:"varint,15,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` // ID of a position. Should be filled in when a position is modified or closed to identify the position. As a rule it is equal to the ID of the order, based on which the position was opened. OppositePositionId uint64 `protobuf:"varint,16,opt,name=opposite_position_id,json=oppositePositionId,proto3" json:"opposite_position_id,omitempty"` // ID of an opposite position. Used when a position is closed by an opposite one open for the same symbol in the opposite direction. CreatedOn *gopb.UnixTimestamp `protobuf:"bytes,17,opt,name=created_on,json=createdOn,proto3" json:"created_on,omitempty"` // The timestamp representing the time when the trade request was created UpdatedOn *gopb.UnixTimestamp `protobuf:"bytes,18,opt,name=updated_on,json=updatedOn,proto3" json:"updated_on,omitempty"` // The timestamp representing the time when the trade request was last updated // contains filtered or unexported fields }
Interaction between the client terminal and a trade server for executing the order placing operation is performed by using the TradeRequest type, which contain all the fields necessary to perform trade deals.
func (*TradeRequest) Descriptor
deprecated
func (*TradeRequest) Descriptor() ([]byte, []int)
Deprecated: Use TradeRequest.ProtoReflect.Descriptor instead.
func (*TradeRequest) GetAction ¶
func (x *TradeRequest) GetAction() TradeRequest_Action
func (*TradeRequest) GetComment ¶
func (x *TradeRequest) GetComment() string
func (*TradeRequest) GetCreatedOn ¶ added in v1.3.17
func (x *TradeRequest) GetCreatedOn() *gopb.UnixTimestamp
func (*TradeRequest) GetDeviation ¶
func (x *TradeRequest) GetDeviation() *gopb.Decimal
func (*TradeRequest) GetExpiration ¶
func (x *TradeRequest) GetExpiration() *gopb.UnixDuration
func (*TradeRequest) GetExpirationType ¶
func (x *TradeRequest) GetExpirationType() ExpirationPolicy
func (*TradeRequest) GetFillType ¶
func (x *TradeRequest) GetFillType() FillPolicy
func (*TradeRequest) GetOppositePositionId ¶
func (x *TradeRequest) GetOppositePositionId() uint64
func (*TradeRequest) GetOrderId ¶
func (x *TradeRequest) GetOrderId() uint64
func (*TradeRequest) GetPositionId ¶
func (x *TradeRequest) GetPositionId() uint64
func (*TradeRequest) GetPrice ¶
func (x *TradeRequest) GetPrice() *gopb.Decimal
func (*TradeRequest) GetStopLimit ¶
func (x *TradeRequest) GetStopLimit() *gopb.Decimal
func (*TradeRequest) GetStopLoss ¶
func (x *TradeRequest) GetStopLoss() *gopb.Decimal
func (*TradeRequest) GetSymbol ¶
func (x *TradeRequest) GetSymbol() string
func (*TradeRequest) GetTakeProfit ¶
func (x *TradeRequest) GetTakeProfit() *gopb.Decimal
func (*TradeRequest) GetType ¶
func (x *TradeRequest) GetType() Order_Type
func (*TradeRequest) GetUpdatedOn ¶ added in v1.3.17
func (x *TradeRequest) GetUpdatedOn() *gopb.UnixTimestamp
func (*TradeRequest) GetVolume ¶
func (x *TradeRequest) GetVolume() *gopb.Decimal
func (*TradeRequest) ProtoMessage ¶
func (*TradeRequest) ProtoMessage()
func (*TradeRequest) ProtoReflect ¶
func (x *TradeRequest) ProtoReflect() protoreflect.Message
func (*TradeRequest) Reset ¶
func (x *TradeRequest) Reset()
func (*TradeRequest) String ¶
func (x *TradeRequest) String() string
type TradeRequest_Action ¶
type TradeRequest_Action int32
Action describes the type of request being made.
const ( TradeRequest_Deal TradeRequest_Action = 0 // Place a trade order for an immediate execution with the specified parameters (market order) TradeRequest_Pending TradeRequest_Action = 1 // Place a trade order for execution under specified conditions (pending order) TradeRequest_SLTP TradeRequest_Action = 2 // Modify the stop-loss and/or take-profit values of an opened position TradeRequest_Modify TradeRequest_Action = 3 // Modify the parameters of a previously placed order TradeRequest_Remove TradeRequest_Action = 4 // Delete a pending order, placed previously TradeRequest_CloseBy TradeRequest_Action = 5 // Close a position by placing an order for an opposite one )
func (TradeRequest_Action) Descriptor ¶
func (TradeRequest_Action) Descriptor() protoreflect.EnumDescriptor
func (TradeRequest_Action) Enum ¶
func (x TradeRequest_Action) Enum() *TradeRequest_Action
func (TradeRequest_Action) EnumDescriptor
deprecated
func (TradeRequest_Action) EnumDescriptor() ([]byte, []int)
Deprecated: Use TradeRequest_Action.Descriptor instead.
func (TradeRequest_Action) MarshalCSV ¶ added in v1.0.1
func (enum TradeRequest_Action) MarshalCSV() (string, error)
MarshalCSV converts a data.TradeRequest.Action value to CSV cell value
func (TradeRequest_Action) MarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum TradeRequest_Action) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)
MarshalDynamoDBAttributeValue converts a data.TradeRequest.Action value to a DynamoDB AttributeValue
func (TradeRequest_Action) MarshalJSON ¶ added in v1.0.1
func (enum TradeRequest_Action) MarshalJSON() ([]byte, error)
MarshalJSON converts a data.TradeRequest.Action value to a JSON value
func (TradeRequest_Action) MarshalYAML ¶ added in v1.0.1
func (enum TradeRequest_Action) MarshalYAML() (interface{}, error)
MarshalYAML converts a data.TradeRequest.Action value to a YAML node value
func (TradeRequest_Action) Number ¶
func (x TradeRequest_Action) Number() protoreflect.EnumNumber
func (*TradeRequest_Action) Scan ¶ added in v1.0.1
func (enum *TradeRequest_Action) Scan(value interface{}) error
Scan attempts to convert an SQL driver value to a new data.TradeRequest.Action value
func (TradeRequest_Action) String ¶
func (x TradeRequest_Action) String() string
func (TradeRequest_Action) Type ¶
func (TradeRequest_Action) Type() protoreflect.EnumType
func (*TradeRequest_Action) UnmarshalCSV ¶ added in v1.0.1
func (enum *TradeRequest_Action) UnmarshalCSV(raw string) error
UnmarshalCSV attempts to convert a CSV cell value to a new data.TradeRequest.Action value
func (*TradeRequest_Action) UnmarshalDynamoDBAttributeValue ¶ added in v1.0.1
func (enum *TradeRequest_Action) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error
UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a data.TradeRequest.Action value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the TradeRequest_Action value will not be modified.
func (*TradeRequest_Action) UnmarshalJSON ¶ added in v1.0.1
func (enum *TradeRequest_Action) UnmarshalJSON(raw []byte) error
UnmarshalJSON attempts to convert a JSON value to a new data.TradeRequest.Action value
func (*TradeRequest_Action) UnmarshalYAML ¶ added in v1.0.1
func (enum *TradeRequest_Action) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML attempts to convert a YAML node to a new data.TradeRequest.Action value