Documentation ¶
Index ¶
- func AddConnection(tx *gorm.DB, c *auth.Context, cs *ConnectionSpec) (*db.Connection, error)
- func AddProductBroker(tx *gorm.DB, c *auth.Context, pbs *ProductBrokerSpec) (*db.ProductBroker, error)
- func AddProductData(tx *gorm.DB, c *auth.Context, pds *ProductDataSpec) (*db.ProductData, error)
- func AddTradingSystem(tx *gorm.DB, c *auth.Context, tss *TradingSystemSpec) (*db.TradingSystem, 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 GetExchanges(tx *gorm.DB) (*[]db.Exchange, error)
- func GetInstrumentDataByProductId(tx *gorm.DB, c *auth.Context, id uint) (*[]db.InstrumentData, 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 GetProductBrokers(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int, ...) (*[]db.ProductBrokerFull, error)
- func GetProductData(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int, ...) (*[]db.ProductDataFull, error)
- func GetTradingSessions(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int) (*[]db.TradingSession, error)
- func GetTradingSystems(tx *gorm.DB, c *auth.Context, filter map[string]any, offset int, limit int, ...) (*[]db.TradingSystemFull, error)
- func UpdateProductBroker(tx *gorm.DB, c *auth.Context, id uint, pbs *ProductBrokerSpec) (*db.ProductBroker, error)
- func UpdateProductData(tx *gorm.DB, c *auth.Context, id uint, pds *ProductDataSpec) (*db.ProductData, error)
- func UpdateTradingSystem(tx *gorm.DB, c *auth.Context, id uint, tss *TradingSystemSpec) (*db.TradingSystem, error)
- type ConnectionSpec
- type PortfolioTree
- type ProductBrokerExt
- type ProductBrokerSpec
- type ProductDataExt
- type ProductDataSpec
- type TradingSystemMessage
- type TradingSystemSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConnection ¶
func AddConnection(tx *gorm.DB, c *auth.Context, cs *ConnectionSpec) (*db.Connection, error)
func AddProductBroker ¶
func AddProductBroker(tx *gorm.DB, c *auth.Context, pbs *ProductBrokerSpec) (*db.ProductBroker, error)
func AddProductData ¶
func AddProductData(tx *gorm.DB, c *auth.Context, pds *ProductDataSpec) (*db.ProductData, error)
func AddTradingSystem ¶
func AddTradingSystem(tx *gorm.DB, c *auth.Context, tss *TradingSystemSpec) (*db.TradingSystem, error)
func GetConnectionById ¶
func GetConnections ¶
func GetPortfolioTree ¶
func GetPortfolios ¶
func GetProductBrokers ¶
func GetProductData ¶
func GetTradingSessions ¶
func GetTradingSystems ¶
func UpdateProductBroker ¶
func UpdateProductBroker(tx *gorm.DB, c *auth.Context, id uint, pbs *ProductBrokerSpec) (*db.ProductBroker, error)
func UpdateProductData ¶
func UpdateProductData(tx *gorm.DB, c *auth.Context, id uint, pds *ProductDataSpec) (*db.ProductData, error)
func UpdateTradingSystem ¶
func UpdateTradingSystem(tx *gorm.DB, c *auth.Context, id uint, tss *TradingSystemSpec) (*db.TradingSystem, error)
Types ¶
type ConnectionSpec ¶
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 ProductBrokerExt ¶
type ProductBrokerExt struct { db.ProductBroker Connection db.Connection `json:"connection"` Exchange db.Exchange `json:"exchange"` Instruments []db.InstrumentBroker `json:"instruments,omitempty"` }
func GetProductBrokerById ¶
type ProductBrokerSpec ¶
type ProductBrokerSpec 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:"required,min=0"` CostPerTrade float32 `json:"costPerTrade" binding:"required,min=0"` MarginValue float32 `json:"marginValue" binding:"required,min=0"` MarketType string `json:"marketType" binding:"required"` ProductType string `json:"productType" binding:"required"` LocalClass string `json:"localClass" binding:"required"` }
type ProductDataExt ¶
type ProductDataExt struct { db.ProductData Connection db.Connection `json:"connection,omitempty"` Exchange db.Exchange `json:"exchange,omitempty"` }
func GetProductDataById ¶
type ProductDataSpec ¶
type ProductDataSpec 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"` Increment float64 `json:"increment" binding:"required,min=0,max=1"` MarketType string `json:"marketType" binding:"required"` ProductType string `json:"productType" binding:"required"` LocalClass string `json:"localClass" binding:"required"` }
type TradingSystemMessage ¶
type TradingSystemMessage struct { TradingSystem db.TradingSystem `json:"tradingSystem"` ProductBroker db.ProductBroker `json:"productBroker"` Currency db.Currency `json:"currency"` }
type TradingSystemSpec ¶
type TradingSystemSpec struct { PortfolioId uint `json:"portfolioId" binding:"required"` ProductDataId uint `json:"productDataId" binding:"required"` ProductBrokerId uint `json:"productBrokerId" 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.