{"modulePath":"github.com/QuantProcessing/exchanges","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package platform\n\n## Constants\n\n```go\nconst (\n\tTopicExecution  = \"execution\"\n\tTopicMarketData = \"market.data\"\n)\n```\n\n## Types\n\n```go\ntype Config struct {\n\tBus             *bus.Bus\n\tCache           *cache.Cache\n\tRisk            *risk.Engine\n\tPortfolio       *portfolio.Portfolio\n\tDataEngine      *data.Engine\n\tExecutionEngine *execution.Engine\n\tDataCatalog     data.Catalog\n\tDataStaleAfter  time.Duration\n\tReconnectPolicy RetryPolicy\n\tLogger          *slog.Logger\n}\n```\n\n```go\ntype DataClientHealth struct {\n\tVenue    model.Venue\n\tClientID string\n\tHealth   venue.DataHealth\n}\n```\n\n```go\ntype ExecutionClientHealth struct {\n\tVenue     model.Venue\n\tAccountID model.AccountID\n\tHealth    venue.ExecutionHealth\n}\n```\n\n```go\ntype Health struct {\n\tReady      bool\n\tState      kernel.ComponentState\n\tRisk       risk.Health\n\tDataEngine data.Health\n\tData       []DataClientHealth\n\tExecution  []ExecutionClientHealth\n\tLastError  error\n}\n```\n\n```go\ntype Node struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewNode(cfg Config) *Node\n```\n\n```go\nfunc (n *Node) AddDataClient(client venue.DataClient) error\n```\n\n```go\nfunc (n *Node) AddExecutionClient(client venue.ExecutionClient) error\n```\n\n```go\nfunc (n *Node) BatchCancelOrders(ctx context.Context, batch model.BatchCancelOrders) ([]model.OrderStatusReport, error)\n```\n\n```go\nfunc (n *Node) Bus() *bus.Bus\n```\n\n```go\nfunc (n *Node) Cache() *cache.Cache\n```\n\n```go\nfunc (n *Node) CancelAllOrders(ctx context.Context, cancelAll model.CancelAllOrders) ([]model.OrderStatusReport, error)\n```\n\n```go\nfunc (n *Node) CancelOrder(ctx context.Context, cancel model.CancelOrder) (model.OrderStatusReport, error)\n```\n\n```go\nfunc (n *Node) CancelTimer(_ context.Context, name string) error\n```\n\n```go\nfunc (n *Node) Clock() strategy.Clock\n```\n\n```go\nfunc (n *Node) DataEngine() *data.Engine\n```\n\n```go\nfunc (n *Node) ExecutionEngine() *execution.Engine\n```\n\n```go\nfunc (n *Node) Health() Health\n```\n\n```go\nfunc (n *Node) Logger() *slog.Logger\n```\n\n```go\nfunc (n *Node) ModifyOrder(ctx context.Context, modify model.ModifyOrder) (model.OrderStatusReport, error)\n```\n\n```go\nfunc (n *Node) OrderFactory(accountID model.AccountID) *model.OrderFactory\n```\n\n```go\nfunc (n *Node) Portfolio() *portfolio.Portfolio\n```\n\n```go\nfunc (n *Node) QueryAccount(ctx context.Context, query model.QueryAccount) (model.AccountSnapshot, error)\n```\n\n```go\nfunc (n *Node) QueryOrder(ctx context.Context, query model.QueryOrder) (model.OrderStatusReport, error)\n```\n\n```go\nfunc (n *Node) RequestData(ctx context.Context, request model.DataRequest) (model.DataResponse, error)\n```\n\n```go\nfunc (n *Node) SetTimer(_ context.Context, name string, interval time.Duration) error\n```\n\n```go\nfunc (n *Node) Start(ctx context.Context) (err error)\n```\n\n```go\nfunc (n *Node) Stop(ctx context.Context) error\n```\n\n```go\nfunc (n *Node) SubmitOrder(ctx context.Context, order model.SubmitOrder) (model.OrderStatusReport, error)\n```\n\n```go\nfunc (n *Node) SubmitOrderList(ctx context.Context, list model.OrderList) ([]model.OrderStatusReport, error)\n```\n\n```go\nfunc (n *Node) SubscribeBars(ctx context.Context, barType model.BarType) error\n```\n\n```go\nfunc (n *Node) SubscribeFundingRates(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\nfunc (n *Node) SubscribeMarketData(ctx context.Context, sub model.SubscribeMarketData) error\n```\n\n```go\nfunc (n *Node) SubscribeOrderBookDepth(ctx context.Context, instrumentID model.InstrumentID, depth int) error\n```\n\n```go\nfunc (n *Node) SubscribeQuoteTicks(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\nfunc (n *Node) SubscribeTicker(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\nfunc (n *Node) SubscribeTradeTicks(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\nfunc (n *Node) UnsubscribeBars(ctx context.Context, barType model.BarType) error\n```\n\n```go\nfunc (n *Node) UnsubscribeFundingRates(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\nfunc (n *Node) UnsubscribeMarketData(ctx context.Context, sub model.SubscribeMarketData) error\n```\n\n```go\nfunc (n *Node) UnsubscribeOrderBookDepth(ctx context.Context, instrumentID model.InstrumentID, depth int) error\n```\n\n```go\nfunc (n *Node) UnsubscribeQuoteTicks(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\nfunc (n *Node) UnsubscribeTicker(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\nfunc (n *Node) UnsubscribeTradeTicks(ctx context.Context, instrumentID model.InstrumentID) error\n```\n\n```go\ntype RetryPolicy struct {\n\tMaxAttempts int\n\tBackoff     time.Duration\n}\n```\n\n","path":"github.com/QuantProcessing/exchanges/platform","name":"platform","synopsis":"","isRedistributable":true}
