{"modulePath":"github.com/QuantProcessing/exchanges","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cache\n\n## Types\n\n```go\ntype Cache struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New() *Cache\n```\n\n```go\nfunc (c *Cache) Account(id model.AccountID) (model.AccountSnapshot, bool)\n```\n\n```go\nfunc (c *Cache) AccountHistory(id model.AccountID) []model.AccountSnapshot\n```\n\n```go\nfunc (c *Cache) Bar(barType model.BarType) (model.Bar, bool)\n```\n\n```go\nfunc (c *Cache) ClearDeferredFillsForOrder(accountID model.AccountID, orderID model.OrderID)\n```\n\n```go\nfunc (c *Cache) ClosedOrders(accountID model.AccountID) []model.OrderStatusReport\n```\n\n```go\nfunc (c *Cache) ClosedPositions(accountID model.AccountID) []model.PositionStatusReport\n```\n\n```go\nfunc (c *Cache) CustomData(instrumentID model.InstrumentID, typ string) (model.CustomData, bool)\n```\n\n```go\nfunc (c *Cache) DeferredFillsForOrder(accountID model.AccountID, orderID model.OrderID) []model.FillReport\n```\n\n```go\nfunc (c *Cache) FillByTradeID(accountID model.AccountID, tradeID model.TradeID) (model.FillReport, bool)\n```\n\n```go\nfunc (c *Cache) FillsByVenueOrderID(accountID model.AccountID, venueOrderID model.VenueOrderID) []model.FillReport\n```\n\n```go\nfunc (c *Cache) FillsForOrder(accountID model.AccountID, orderID model.OrderID) []model.FillReport\n```\n\n```go\nfunc (c *Cache) FundingRate(instrumentID model.InstrumentID) (model.FundingRate, bool)\n```\n\n```go\nfunc (c *Cache) Instrument(id model.InstrumentID) (model.Instrument, bool)\n```\n\n```go\nfunc (c *Cache) Instruments() []model.Instrument\n```\n\n```go\nfunc (c *Cache) LatestBar(instrumentID model.InstrumentID) (model.Bar, bool)\n```\n\n```go\nfunc (c *Cache) OpenOrders(accountID model.AccountID) []model.OrderStatusReport\n```\n\n```go\nfunc (c *Cache) OpenPositions(accountID model.AccountID) []model.PositionStatusReport\n```\n\n```go\nfunc (c *Cache) Order(accountID model.AccountID, orderID model.OrderID) (model.OrderStatusReport, bool)\n```\n\n```go\nfunc (c *Cache) OrderBook(instrumentID model.InstrumentID) (model.OrderBook, bool)\n```\n\n```go\nfunc (c *Cache) OrderByClientID(accountID model.AccountID, clientOrderID model.ClientOrderID) (model.OrderStatusReport, bool)\n```\n\n```go\nfunc (c *Cache) OrderByVenueID(accountID model.AccountID, venueOrderID model.VenueOrderID) (model.OrderStatusReport, bool)\n```\n\n```go\nfunc (c *Cache) Orders(accountID model.AccountID) []model.OrderStatusReport\n```\n\n```go\nfunc (c *Cache) OrdersByExecSpawnID(accountID model.AccountID, execSpawnID model.ExecSpawnID) []model.OrderStatusReport\n```\n\n```go\nfunc (c *Cache) OrdersByOrderListID(accountID model.AccountID, orderListID model.OrderListID) []model.OrderStatusReport\n```\n\n```go\nfunc (c *Cache) OrdersByPositionID(accountID model.AccountID, positionID model.PositionID) []model.OrderStatusReport\n```\n\n```go\nfunc (c *Cache) OrdersByStrategy(accountID model.AccountID, strategyID model.StrategyID) []model.OrderStatusReport\n```\n\n```go\nfunc (c *Cache) Position(accountID model.AccountID, positionID model.PositionID) (model.PositionStatusReport, bool)\n```\n\n```go\nfunc (c *Cache) PositionByInstrument(accountID model.AccountID, instrumentID model.InstrumentID) (model.PositionStatusReport, bool)\n```\n\n```go\nfunc (c *Cache) PositionByVenueID(accountID model.AccountID, venuePositionID model.VenuePositionID) (model.PositionStatusReport, bool)\n```\n\n```go\nfunc (c *Cache) Positions(accountID model.AccountID) []model.PositionStatusReport\n```\n\n```go\nfunc (c *Cache) PositionsByStrategy(accountID model.AccountID, strategyID model.StrategyID) []model.PositionStatusReport\n```\n\n```go\nfunc (c *Cache) PositionsForInstrument(instrumentID model.InstrumentID) []model.PositionStatusReport\n```\n\n```go\nfunc (c *Cache) Purge(accountID model.AccountID, policy PurgePolicy) PurgeResult\n```\n\n```go\nfunc (c *Cache) PutAccount(account model.AccountSnapshot)\n```\n\n```go\nfunc (c *Cache) PutDeferredFill(fill model.FillReport) (bool, error)\n```\n\n```go\nfunc (c *Cache) PutFill(fill model.FillReport) (bool, error)\n```\n\n```go\nfunc (c *Cache) PutInstrument(inst model.Instrument) error\n```\n\n```go\nfunc (c *Cache) PutMarketEvent(event model.MarketEvent) error\n```\n\n```go\nfunc (c *Cache) PutOrder(order model.OrderStatusReport) error\n```\n\n```go\nfunc (c *Cache) PutPosition(position model.PositionStatusReport) error\n```\n\n```go\nfunc (c *Cache) PutSyntheticInstrument(inst model.SyntheticInstrument) error\n```\n\n```go\nfunc (c *Cache) QuoteTick(instrumentID model.InstrumentID) (model.QuoteTick, bool)\n```\n\n```go\nfunc (c *Cache) Residuals(accountID model.AccountID) Residuals\n```\n\n```go\nfunc (c *Cache) Snapshot(accountID model.AccountID) Snapshot\n```\n\n```go\nfunc (c *Cache) SyntheticInstrument(id model.InstrumentID) (model.SyntheticInstrument, bool)\n```\n\n```go\nfunc (c *Cache) SyntheticInstruments() []model.SyntheticInstrument\n```\n\n```go\nfunc (c *Cache) Ticker(instrumentID model.InstrumentID) (model.Ticker, bool)\n```\n\n```go\nfunc (c *Cache) TradeTick(instrumentID model.InstrumentID) (model.TradeTick, bool)\n```\n\n```go\ntype PurgePolicy struct {\n\tClosedOrdersLimit     int\n\tClosedPositionsLimit  int\n\tAccountSnapshotsLimit int\n}\n```\n\n```go\ntype PurgeResult struct {\n\tClosedOrders     int\n\tClosedPositions  int\n\tAccountSnapshots int\n}\n```\n\n```go\ntype Residuals struct {\n\tOpenOrders                   int\n\tOpenPositions                int\n\tDeferredFills                int\n\tInconsistentOrderMappings    int\n\tInconsistentPositionMappings int\n}\n```\n\n```go\ntype Snapshot struct {\n\tAccountID       model.AccountID\n\tAccount         model.AccountSnapshot\n\tAccountHistory  []model.AccountSnapshot\n\tOpenOrders      []model.OrderStatusReport\n\tClosedOrders    []model.OrderStatusReport\n\tOpenPositions   []model.PositionStatusReport\n\tClosedPositions []model.PositionStatusReport\n\tDeferredFills   []model.FillReport\n\tResiduals       Residuals\n}\n```\n\n","path":"github.com/QuantProcessing/exchanges/cache","name":"cache","synopsis":"","isRedistributable":true}
