Documentation ¶
Index ¶
- func AddConnection(tx *gorm.DB, conn *Connection) error
- func AddTradingSystem(tx *gorm.DB, ts *TradingSystem) error
- func GetConnections(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]Connection, error)
- func GetInstrumentsByBrokerId(tx *gorm.DB, id uint) (*[]InstrumentBroker, error)
- func GetPortfolios(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]Portfolio, error)
- func GetProductBrokers(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]ProductBrokerFull, error)
- func GetProductBrokersFull(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]ProductBrokerFull, error)
- func GetProductFeeds(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]ProductFeedFull, error)
- func GetProductFeedsFull(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]ProductFeedFull, error)
- func GetTradingSessions(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]TradingSession, error)
- func GetTradingSystems(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]TradingSystemFull, error)
- func GetTradingSystemsFull(tx *gorm.DB, filter map[string]any, offset int, limit int) (*[]TradingSystemFull, error)
- func InitDatabase(cfg *core.Database)
- func RunInTransaction(f func(tx *gorm.DB) error) error
- func UpdateTradingSystem(tx *gorm.DB, ts *TradingSystem)
- type Common
- type Connection
- type Currency
- type InstrumentBroker
- type InstrumentFeed
- type Portfolio
- type ProductBroker
- type ProductBrokerFull
- type ProductFeed
- type ProductFeedFull
- type TradingSession
- type TradingSystem
- type TradingSystemFull
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConnection ¶
func AddConnection(tx *gorm.DB, conn *Connection) error
func AddTradingSystem ¶
func AddTradingSystem(tx *gorm.DB, ts *TradingSystem) error
func GetConnections ¶
func GetInstrumentsByBrokerId ¶
func GetInstrumentsByBrokerId(tx *gorm.DB, id uint) (*[]InstrumentBroker, error)
func GetPortfolios ¶
func GetProductBrokers ¶
func GetProductBrokersFull ¶
func GetProductFeeds ¶
func GetProductFeedsFull ¶
func GetTradingSessions ¶
func GetTradingSystems ¶
func GetTradingSystemsFull ¶
func InitDatabase ¶
func UpdateTradingSystem ¶
func UpdateTradingSystem(tx *gorm.DB, ts *TradingSystem)
Types ¶
type Connection ¶
type Connection struct { Common Username string `json:"username"` Code string `json:"code"` Name string `json:"name"` SystemCode string `json:"systemCode"` SystemName string `json:"systemName"` SystemConfig string `json:"systemConfig"` ConnectionCode string `json:"connectionCode"` SupportsFeed bool `json:"supportsFeed"` SupportsBroker bool `json:"supportsBroker"` SupportsMultipleFeeds bool `json:"supportsMultipleFeeds"` SupportsInventory bool `json:"supportsInventory"` }
func GetConnectionById ¶
func GetConnectionById(tx *gorm.DB, id uint) (*Connection, error)
func (Connection) TableName ¶
func (Connection) TableName() string
type InstrumentBroker ¶
type InstrumentBroker struct { Id uint `json:"id" gorm:"primaryKey"` ProductBrokerId uint `json:"productBrokerId"` Symbol string `json:"symbol"` Name string `json:"name"` ExpirationDate time.Time `json:"expirationDate"` }
func (InstrumentBroker) TableName ¶
func (InstrumentBroker) TableName() string
type InstrumentFeed ¶
type InstrumentFeed struct { Id uint `json:"id" gorm:"primaryKey"` ProductFeedId uint `json:"productFeedId"` Symbol string `json:"symbol"` Name string `json:"name"` ExpirationDate time.Time `json:"expirationDate"` IsContinuous bool `json:"isContinuous"` }
func (InstrumentFeed) TableName ¶
func (InstrumentFeed) TableName() string
type Portfolio ¶
type ProductBroker ¶
type ProductBroker struct { Common ConnectionId uint `json:"connectionId"` Username string `json:"username"` Symbol string `json:"symbol"` Name string `json:"name"` PointValue float32 `json:"pointValue"` CostPerTrade float32 `json:"costPerTrade"` MarginValue float32 `json:"marginValue"` CurrencyId uint `json:"currencyId"` MarketType string `json:"marketType"` ProductType string `json:"productType"` Exchange string `json:"exchange"` }
func GetProductBrokerById ¶
func GetProductBrokerById(tx *gorm.DB, id uint) (*ProductBroker, error)
func (ProductBroker) TableName ¶
func (ProductBroker) TableName() string
type ProductBrokerFull ¶
type ProductBrokerFull struct { ProductBroker CurrencyCode string `json:"currencyCode,omitempty"` ConnectionCode string `json:"connectionCode,omitempty"` }
type ProductFeed ¶
type ProductFeed struct { Common ConnectionId uint `json:"connectionId"` Username string `json:"username"` Symbol string `json:"symbol"` Name string `json:"name"` PriceScale int `json:"priceScale"` MinMovement float32 `json:"minMovement"` MarketType string `json:"marketType"` ProductType string `json:"productType"` Exchange string `json:"exchange"` }
func (ProductFeed) TableName ¶
func (ProductFeed) TableName() string
type ProductFeedFull ¶
type ProductFeedFull struct { ProductFeed ConnectionCode string `json:"connectionCode,omitempty"` }
type TradingSession ¶
type TradingSession struct { Common Username string `json:"username"` Name string `json:"name"` Config string `json:"config"` }
func (TradingSession) TableName ¶
func (TradingSession) TableName() string
type TradingSystem ¶
type TradingSystem struct { Common PortfolioId uint `json:"portfolioId"` ProductFeedId uint `json:"productFeedId"` ProductBrokerId uint `json:"productBrokerId"` TradingSessionId uint `json:"tradingSessionId"` Username string `json:"username"` WorkspaceCode string `json:"workspaceCode"` Name string `json:"name"` }
func GetTradingSystemById ¶
func GetTradingSystemById(tx *gorm.DB, id uint) (*TradingSystem, error)
func (TradingSystem) TableName ¶
func (TradingSystem) TableName() string
type TradingSystemFull ¶
type TradingSystemFull struct { TradingSystem FeedSymbol string `json:"feedSymbol,omitempty"` BrokerSymbol string `json:"brokerSymbol,omitempty"` PortfolioName string `json:"portfolioName,omitempty"` TradingSession string `json:"tradingSession,omitempty"` }
Click to show internal directories.
Click to hide internal directories.