Versions in this module Expand all Collapse all v0 v0.1.2 Nov 13, 2021 v0.1.1 Aug 30, 2021 v0.1.0 Aug 30, 2021 Changes in this version + func MigrateDB(s *TickerSession) (int, error) + type Asset struct + Amount float64 + AnchorAssetCode string + AnchorAssetType string + AssetControlledByDomain bool + AuthRequired bool + AuthRevocable bool + Code string + CollateralAddressSignatures string + CollateralAddresses string + Conditions string + Countries string + Desc string + DisplayDecimals int + FixedNumber int + ID int32 + IsAssetAnchored bool + IsUnlimited bool + IsValid bool + Issuer Issuer + IssuerAccount string + IssuerID int32 + LastChecked time.Time + LastValid time.Time + MaxNumber int + Name string + NumAccounts int32 + RedemptionInstructions string + Status string + Type string + ValidationError string + type Issuer struct + AuthServer string + DepositServer string + FederationServer string + ID int32 + Name string + OrgTwitter string + PublicKey string + TOMLURL string + TransferServer string + URL string + WebAuthEndpoint string + type Market struct + AskVolume float64 + BaseVolume24h float64 + BaseVolume7d float64 + BidVolume float64 + CounterVolume24h float64 + CounterVolume7d float64 + HighestBid float64 + HighestPrice24h float64 + HighestPrice7d float64 + LastPrice float64 + LastPriceCloseTime time.Time + LowestAsk float64 + LowestPrice24h float64 + LowestPrice7d float64 + NumAsks int + NumBids int + OpenPrice24h float64 + OpenPrice7d float64 + PriceChange24h float64 + PriceChange7d float64 + TradeCount24h int64 + TradeCount7d int64 + TradePair string + type OrderbookStats struct + AskVolume float64 + BaseAssetID int32 + BidVolume float64 + CounterAssetID int32 + HighestBid float64 + ID int32 + LowestAsk float64 + NumAsks int + NumBids int + Spread float64 + SpreadMidPoint float64 + UpdatedAt time.Time + type PartialMarket struct + AskVolume float64 + AskVolumeReverse float64 + BaseAssetCode string + BaseAssetID int32 + BaseAssetIssuer string + BaseAssetType string + BaseVolume float64 + BidVolume float64 + BidVolumeReverse float64 + Change float64 + Close float64 + CounterAssetCode string + CounterAssetID int32 + CounterAssetIssuer string + CounterAssetType string + CounterVolume float64 + FirstLedgerCloseTime time.Time + High float64 + HighestBid float64 + HighestBidReverse float64 + IntervalStart time.Time + LastLedgerCloseTime time.Time + Low float64 + LowestAsk float64 + LowestAskReverse float64 + NumAsks int + NumAsksReverse int + NumBids int + NumBidsReverse int + Open float64 + TradeCount int32 + TradePairName string + type TickerSession struct + func CreateSession(driverName, dataSourceName string) (session TickerSession, err error) + func (s *TickerSession) BulkInsertTrades(ctx context.Context, trades []Trade) (err error) + func (s *TickerSession) DeleteOldTrades(ctx context.Context, minDate time.Time) error + func (s *TickerSession) GetAllIssuers(ctx context.Context) (issuers []Issuer, err error) + func (s *TickerSession) GetAllValidAssets(ctx context.Context) (assets []Asset, err error) + func (s *TickerSession) GetAssetByCodeAndIssuerAccount(ctx context.Context, code string, issuerAccount string) (found bool, id int32, err error) + func (s *TickerSession) GetAssetsWithNestedIssuer(ctx context.Context) (assets []Asset, err error) + func (s *TickerSession) GetLastTrade(ctx context.Context) (trade Trade, err error) + func (s *TickerSession) InsertOrUpdateAsset(ctx context.Context, a *Asset, preserveFields []string) (err error) + func (s *TickerSession) InsertOrUpdateIssuer(ctx context.Context, issuer *Issuer, preserveFields []string) (id int32, err error) + func (s *TickerSession) InsertOrUpdateOrderbookStats(ctx context.Context, o *OrderbookStats, preserveFields []string) (err error) + func (s *TickerSession) Retrieve7DRelevantMarkets(ctx context.Context) (partialMkts []PartialMarket, err error) + func (s *TickerSession) RetrieveMarketData(ctx context.Context) (markets []Market, err error) + func (s *TickerSession) RetrievePartialAggMarkets(ctx context.Context, code *string, pairNames *[]*string, numHoursAgo int) (partialMkts []PartialMarket, err error) + func (s *TickerSession) RetrievePartialMarkets(ctx context.Context, baseAssetCode *string, baseAssetIssuer *string, ...) (partialMkts []PartialMarket, err error) + type Trade struct + BaseAccount string + BaseAmount float64 + BaseAssetID int32 + BaseIsSeller bool + BaseOfferID string + CounterAccount string + CounterAmount float64 + CounterAssetID int32 + CounterOfferID string + HorizonID string + ID int32 + LedgerCloseTime time.Time + OfferID string + Price float64