Documentation
¶
Index ¶
- func AddBrokerProduct(tx *gorm.DB, c *auth.Context, bps *BrokerProductSpec) (*db.BrokerProduct, error)
- func AddConnection(tx *gorm.DB, c *auth.Context, cs *ConnectionSpec) (*db.Connection, error)
- func AddDataProduct(tx *gorm.DB, c *auth.Context, pds *DataProductSpec) (*db.DataProduct, error)
- func AddTradingSystem(tx *gorm.DB, c *auth.Context, tss *TradingSystemSpec) (*db.TradingSystem, error)
- func GetBrokerProducts(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int, ...) (*[]db.BrokerProductFull, error)
- func GetConnectionById(tx *gorm.DB, c *auth.Context, id uint) (*db.Connection, error)
- func GetConnections(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int) (*[]db.Connection, error)
- func GetCurrencies(tx *gorm.DB) (*[]db.Currency, error)
- func GetDataProducts(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int, ...) (*[]db.DataProductFull, error)
- func GetExchanges(tx *gorm.DB) (*[]db.Exchange, error)
- func GetPortfolioTree(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int) (*[]*PortfolioTree, error)
- func GetPortfolios(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int) (*[]db.Portfolio, error)
- func GetTradingSessions(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int) (*[]TradingSession, error)
- func GetTradingSystems(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int, ...) (*[]db.TradingSystemFull, error)
- func UpdateBrokerProduct(tx *gorm.DB, c *auth.Context, id uint, pbs *BrokerProductSpec) (*db.BrokerProduct, error)
- func UpdateConnection(tx *gorm.DB, c *auth.Context, id uint, cs *ConnectionSpec) (*db.Connection, error)
- func UpdateDataProduct(tx *gorm.DB, c *auth.Context, id uint, pds *DataProductSpec) (*db.DataProduct, error)
- func UpdateTradingSystem(tx *gorm.DB, c *auth.Context, id uint, tss *TradingSystemSpec) (*db.TradingSystem, error)
- type BrokerProductExt
- type BrokerProductMessage
- type BrokerProductSpec
- type ConnectionSpec
- type DataProductExt
- type DataProductMessage
- type DataProductSpec
- type PortfolioTree
- type TradingSession
- type TradingSystemMessage
- type TradingSystemSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBrokerProduct ¶
func AddBrokerProduct(tx *gorm.DB, c *auth.Context, bps *BrokerProductSpec) (*db.BrokerProduct, error)
func AddConnection ¶
func AddConnection(tx *gorm.DB, c *auth.Context, cs *ConnectionSpec) (*db.Connection, error)
func AddDataProduct ¶
func AddDataProduct(tx *gorm.DB, c *auth.Context, pds *DataProductSpec) (*db.DataProduct, error)
func AddTradingSystem ¶
func AddTradingSystem(tx *gorm.DB, c *auth.Context, tss *TradingSystemSpec) (*db.TradingSystem, error)
func GetBrokerProducts ¶
func GetConnectionById ¶
func GetConnections ¶
func GetDataProducts ¶
func GetPortfolioTree ¶
func GetPortfolios ¶
func GetTradingSessions ¶
func GetTradingSystems ¶
func UpdateBrokerProduct ¶
func UpdateBrokerProduct(tx *gorm.DB, c *auth.Context, id uint, pbs *BrokerProductSpec) (*db.BrokerProduct, error)
func UpdateConnection ¶
func UpdateConnection(tx *gorm.DB, c *auth.Context, id uint, cs *ConnectionSpec) (*db.Connection, error)
func UpdateDataProduct ¶
func UpdateDataProduct(tx *gorm.DB, c *auth.Context, id uint, pds *DataProductSpec) (*db.DataProduct, error)
func UpdateTradingSystem ¶
func UpdateTradingSystem(tx *gorm.DB, c *auth.Context, id uint, tss *TradingSystemSpec) (*db.TradingSystem, error)
Types ¶
type BrokerProductExt ¶
type BrokerProductExt struct { db.BrokerProduct Connection db.Connection `json:"connection"` Exchange db.Exchange `json:"exchange"` Instruments []db.BrokerInstrument `json:"instruments,omitempty"` }
func GetBrokerProductById ¶
type BrokerProductMessage ¶
type BrokerProductMessage struct { BrokerProduct db.BrokerProduct `json:"brokerProduct"` Connection db.Connection `json:"connection"` Exchange db.Exchange `json:"exchange"` Currency db.Currency `json:"currency"` }
type BrokerProductSpec ¶
type BrokerProductSpec struct { ConnectionId uint `json:"connectionId" binding:"required"` ExchangeId uint `json:"exchangeId" binding:"required"` Symbol string `json:"symbol" binding:"required"` Name string `json:"name" binding:"required"` PointValue float32 `json:"pointValue" binding:"min=0,max=1000000"` CostPerOperation float32 `json:"costPerOperation" binding:"min=0,max=10000"` MarginValue float32 `json:"marginValue" binding:"min=0,max=1000000"` Increment float64 `json:"increment" binding:"min=0,max=1"` MarketType string `json:"marketType" binding:"required"` ProductType string `json:"productType" binding:"required"` }
type ConnectionSpec ¶
type DataProductExt ¶
type DataProductExt struct { db.DataProduct Connection db.Connection `json:"connection,omitempty"` Exchange db.Exchange `json:"exchange,omitempty"` }
func GetDataProductById ¶
type DataProductMessage ¶
type DataProductMessage struct { DataProduct db.DataProduct `json:"dataProduct"` Connection db.Connection `json:"connection"` Exchange db.Exchange `json:"exchange"` }
type DataProductSpec ¶
type DataProductSpec struct { ConnectionId uint `json:"connectionId" binding:"required"` ExchangeId uint `json:"exchangeId" binding:"required"` Symbol string `json:"symbol" binding:"required"` Name string `json:"name" binding:"required"` MarketType string `json:"marketType" binding:"required"` ProductType string `json:"productType" binding:"required"` }
type PortfolioTree ¶
type PortfolioTree struct { db.Portfolio Children []*PortfolioTree `json:"children"` TradingSystems []*db.TradingSystemFull `json:"tradingSystems"` }
func (*PortfolioTree) AddChild ¶
func (pt *PortfolioTree) AddChild(p *PortfolioTree)
func (*PortfolioTree) AddTradingSystem ¶
func (pt *PortfolioTree) AddTradingSystem(ts *db.TradingSystemFull)
type TradingSession ¶
type TradingSystemMessage ¶
type TradingSystemMessage struct { TradingSystem db.TradingSystem `json:"tradingSystem"` BrokerProduct db.BrokerProduct `json:"brokerProduct"` Currency db.Currency `json:"currency"` }
type TradingSystemSpec ¶
type TradingSystemSpec struct { PortfolioId uint `json:"portfolioId" binding:"required"` DataProductId uint `json:"dataProductId" binding:"required"` BrokerProductId uint `json:"brokerProductId" binding:"required"` TradingSessionId uint `json:"tradingSessionId" binding:"required"` WorkspaceCode string `json:"workspaceCode" binding:"required"` Name string `json:"name" binding:"required"` }
Click to show internal directories.
Click to hide internal directories.