Documentation ¶
Index ¶
- Constants
- Variables
- func AllFuturesMarketsHuobi() []string
- func FloatToString(input_num float64) string
- func GetDecimals(tokenAddress common.Address, chainid string) (decimals uint8, err error)
- func GetName(tokenAddress common.Address, chainid string) (name string, err error)
- func GetSymbol(tokenAddress common.Address, chainid string) (name string, err error)
- func GzipDecode(in []byte) (content []byte, err error)
- func InitialiseRestClientsMap()
- func InitialiseWsClientsMap()
- func NewTrade(pair dia.ExchangePair, info krakenapi.TradeInfo, foreignTradeID string, ...) *dia.Trade
- func Populate(datastore *models.DB, rdb *models.RelDB, pairs []string)
- func Round(x, unit float64) float64
- type APIScraper
- type AllOKEXMarketResponse
- type AnyswapPair
- type AnyswapPairScraper
- type AnyswapScraper
- func (ps *AnyswapScraper) Channel() chan *dia.Trade
- func (s *AnyswapScraper) Close() error
- func (s *AnyswapScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *AnyswapScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *AnyswapScraper) GetSwapOutChannel(tokens []common.Address, chainID string) (chan *anyswap.AnyswapV4RouterLogAnySwapOut, error)
- func (s *AnyswapScraper) ListenToChainOut(chainID string)
- func (up *AnyswapScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *AnyswapScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type AnyswapSwap
- type AnyswapToken
- type BalancerPairScraper
- type BalancerScraper
- func (scraper *BalancerScraper) Channel() chan *dia.Trade
- func (scraper *BalancerScraper) Close() error
- func (scraper *BalancerScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *BalancerScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *BalancerScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *BalancerScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BalancerSwap
- type BalancerToken
- type BalancerV2PairScraper
- type BalancerV2Scraper
- func (s *BalancerV2Scraper) Channel() chan *dia.Trade
- func (s *BalancerV2Scraper) Close() error
- func (s *BalancerV2Scraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BalancerV2Scraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *BalancerV2Scraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BalancerV2Scraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BalancerV2Swap
- type BancorPairScraper
- type BancorPool
- type BancorPools
- type BancorScraper
- func (scraper *BancorScraper) Channel() chan *dia.Trade
- func (scraper *BancorScraper) Close() error
- func (scraper *BancorScraper) ConverterTypeFour(address common.Address) (tokenAddress []common.Address, err error)
- func (scraper *BancorScraper) ConverterTypeOne(address common.Address) (tokenAddress []common.Address, err error)
- func (scraper *BancorScraper) ConverterTypeThree(address common.Address) (tokenAddress []common.Address, err error)
- func (scraper *BancorScraper) ConverterTypeZero(address common.Address) (tokenAddress []common.Address, err error)
- func (scraper *BancorScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *BancorScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (scraper *BancorScraper) GetConversion() (chan *BancorNetwork.BancorNetworkConversion, error)
- func (scraper *BancorScraper) GetPair(address []common.Address) dia.ExchangePair
- func (scraper *BancorScraper) GetpoolAddress()
- func (scraper *BancorScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *BancorScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BancorSwap
- type BinancePairScraper
- type BinanceScraper
- func (ps *BinanceScraper) Channel() chan *dia.Trade
- func (s *BinanceScraper) Close() error
- func (s *BinanceScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BinanceScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (up *BinanceScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BinanceScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BinanceScraperUS
- func (ps *BinanceScraperUS) Channel() chan *dia.Trade
- func (s *BinanceScraperUS) Close() error
- func (s *BinanceScraperUS) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BinanceScraperUS) FillSymbolData(symbol string) (dia.Asset, error)
- func (up *BinanceScraperUS) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BinanceScraperUS) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BinanceUSPairScraper
- type BinanceUSPairScraperSet
- type BitBayMarket
- type BitBayMarkets
- type BitBayPairScraper
- type BitBayScraper
- func (s *BitBayScraper) Channel() chan *dia.Trade
- func (s *BitBayScraper) Close() error
- func (s *BitBayScraper) Error() error
- func (s *BitBayScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BitBayScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *BitBayScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BitBayScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BitBaySubscribe
- type BitBayTrade
- type BitBayTransaction
- type BitBayWSResponse
- type BitMaxAsset
- type BitMaxAssets
- type BitMaxPair
- type BitMaxPairResponse
- type BitMaxPairScraper
- type BitMaxRequest
- type BitMaxScraper
- func (ps *BitMaxScraper) Channel() chan *dia.Trade
- func (s *BitMaxScraper) Close() error
- func (s *BitMaxScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BitMaxScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *BitMaxScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BitMaxScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BitMaxTradeResponse
- type BitMexPairScraper
- type BitMexScraper
- func (s *BitMexScraper) Channel() chan *dia.Trade
- func (s *BitMexScraper) Close() error
- func (s *BitMexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BitMexScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *BitMexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BitMexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BitfinexPairScraper
- type BitfinexScraper
- func (ps *BitfinexScraper) Channel() chan *dia.Trade
- func (s *BitfinexScraper) Close() error
- func (s *BitfinexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BitfinexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *BitfinexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BitfinexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BitflyerScraper
- type BitforexPairScraper
- type BitforexScraper
- func (s *BitforexScraper) Channel() chan *dia.Trade
- func (s *BitforexScraper) Close() error
- func (s *BitforexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BitforexScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *BitforexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BitforexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BitmexScraper
- type BittrexPairScraper
- type BittrexScraper
- func (s *BittrexScraper) Channel() chan *dia.Trade
- func (s *BittrexScraper) Close() error
- func (s *BittrexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BittrexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *BittrexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BittrexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BridgeSwapPair
- type BridgeSwapPairScraper
- type BridgeSwapScraper
- func (ps *BridgeSwapScraper) Channel() chan *dia.Trade
- func (s *BridgeSwapScraper) Close() error
- func (b *BridgeSwapScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *BridgeSwapScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (up *BridgeSwapScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *BridgeSwapScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type BridgeSwapSwap
- type BridgeSwapToken
- type ByBitMarket
- type ByBitMarketsResponse
- type ByBitPairScraper
- type ByBitScraper
- func (s *ByBitScraper) Channel() chan *dia.Trade
- func (s *ByBitScraper) Close() error
- func (s *ByBitScraper) Error() error
- func (s *ByBitScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *ByBitScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *ByBitScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *ByBitScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type ByBitSubscribe
- type ByBitTradeResponse
- type CREX24ApiInstrument
- type CREX24ApiTrade
- type CREX24ApiTradeUpdate
- type CREX24PairScraper
- type CREX24Scraper
- func (s *CREX24Scraper) Channel() chan *dia.Trade
- func (s *CREX24Scraper) Close() error
- func (s *CREX24Scraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *CREX24Scraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *CREX24Scraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *CREX24Scraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type CREX4Asset
- type Channel
- type CoinBasePairScraper
- type CoinBaseScraper
- func (ps *CoinBaseScraper) Channel() chan *dia.Trade
- func (s *CoinBaseScraper) Close() error
- func (s *CoinBaseScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *CoinBaseScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *CoinBaseScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *CoinBaseScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type CoinflexFuturesScraper
- type ComputedCVI
- type ComputedCVIs
- type Confirm
- type CryptoDotComPairScraper
- type CryptoDotComScraper
- func (s *CryptoDotComScraper) Channel() chan *dia.Trade
- func (s *CryptoDotComScraper) Close() error
- func (s *CryptoDotComScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *CryptoDotComScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *CryptoDotComScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *CryptoDotComScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type CurveCoin
- type CurveFIPairScraper
- type CurveFIScraper
- func (scraper *CurveFIScraper) Channel() chan *dia.Trade
- func (scraper *CurveFIScraper) Close() error
- func (scraper *CurveFIScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *CurveFIScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (scraper *CurveFIScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *CurveFIScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type DeribitScraper
- type DeribitScraperKind
- type DforcePairScraper
- type DforceScraper
- func (scraper *DforceScraper) Channel() chan *dia.Trade
- func (scraper *DforceScraper) Close() error
- func (scraper *DforceScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *DforceScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (scraper *DforceScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *DforceScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type DforceToken
- type ECBPairScraper
- type ECBScraper
- type Event
- type EventFlag
- type EventType
- type FTXFuturesScraper
- type FTXPairScraper
- type FTXScraper
- func (s *FTXScraper) Channel() chan *dia.Trade
- func (s *FTXScraper) Close() error
- func (s *FTXScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *FTXScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *FTXScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *FTXScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type FinageForexPairScraper
- type FinageForexScraper
- func (ps *FinageForexScraper) Channel() chan *dia.Trade
- func (s *FinageForexScraper) Close() error
- func (s *FinageForexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *FinageForexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *FinageForexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *FinageForexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- func (s *FinageForexScraper) Update() error
- type FinageSymbolResponse
- type FinageTrade
- type FinageWSMessage
- type FuturesScraper
- func NewBitflyerFuturesScraper(markets []string) FuturesScraper
- func NewBitmexFuturesScraper(markets []string) FuturesScraper
- func NewCoinflexFuturesScraper(markets []string) FuturesScraper
- func NewDeribitFuturesScraper(markets []string, accessKey string, accessSecret string) FuturesScraper
- func NewFTXFuturesScraper(markets []string) FuturesScraper
- func NewHuobiFuturesScraper(markets []string) FuturesScraper
- type GateIOCurrency
- type GateIOPair
- type GateIOPairScraper
- type GateIOResponseTrade
- type GateIOScraper
- func (ps *GateIOScraper) Channel() chan *dia.Trade
- func (s *GateIOScraper) Close() error
- func (s *GateIOScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *GateIOScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *GateIOScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *GateIOScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type GateIOTickerData
- type GateIPPairResponse
- type HitBTCAsset
- type HitBTCPairScraper
- type HitBTCScraper
- func (ps *HitBTCScraper) Channel() chan *dia.Trade
- func (s *HitBTCScraper) Close() error
- func (s *HitBTCScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (ps *HitBTCScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *HitBTCScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *HitBTCScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type HuobiCurrency
- type HuobiFuturesScraper
- type HuobiPairScraper
- type HuobiScraper
- func (ps *HuobiScraper) Channel() chan *dia.Trade
- func (s *HuobiScraper) Close() error
- func (s *HuobiScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *HuobiScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *HuobiScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *HuobiScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type InfluxPairScraper
- type InfluxScraper
- func (s *InfluxScraper) Channel() chan *dia.Trade
- func (s *InfluxScraper) Close() error
- func (s *InfluxScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *InfluxScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *InfluxScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *InfluxScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type KrakenPairScraper
- type KrakenScraper
- func (ps *KrakenScraper) Channel() chan *dia.Trade
- func (s *KrakenScraper) Close() error
- func (s *KrakenScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *KrakenScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (ps *KrakenScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *KrakenScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- func (s *KrakenScraper) Update()
- type KuCoinPairScraper
- type KuCoinScraper
- func (ps *KuCoinScraper) Channel() chan *dia.Trade
- func (s *KuCoinScraper) Close() error
- func (s *KuCoinScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *KuCoinScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *KuCoinScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *KuCoinScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type KuExchangePair
- type KuExchangePairs
- type KucoinCurrency
- type KucoinMarketMatch
- type KyberPairScraper
- type KyberScraper
- func (scraper *KyberScraper) Channel() chan *dia.Trade
- func (scraper *KyberScraper) Close() error
- func (scraper *KyberScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *KyberScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (scraper *KyberScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *KyberScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type KyberToken
- type LBankPairScraper
- type LBankScraper
- func (ps *LBankScraper) Channel() chan *dia.Trade
- func (s *LBankScraper) Close() error
- func (s *LBankScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *LBankScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *LBankScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *LBankScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type LiquidChannel
- type LiquidProduct
- type LiquidProducts
- type LiquidResponse
- type LiquidResponseTrade
- type LiquidSubscribe
- type LoopringKey
- type LoopringMarket
- type LoopringPairScraper
- type LoopringScraper
- func (ps *LoopringScraper) Channel() chan *dia.Trade
- func (s *LoopringScraper) Close() error
- func (s *LoopringScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *LoopringScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *LoopringScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *LoopringScraper) Pong(messageType int) error
- func (s *LoopringScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type LoopringTopic
- type MEXCExchangeInfo
- type MEXCExchangeSymbol
- type MEXCPairScraper
- type MEXCRequest
- type MEXCScraper
- func (s *MEXCScraper) Channel() chan *dia.Trade
- func (s *MEXCScraper) Close() error
- func (s *MEXCScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *MEXCScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *MEXCScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *MEXCScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type MEXCTradeResponse
- type MakerPair
- type MakerPairResponse
- type MakerPairScraper
- type MakerScraper
- func (scraper *MakerScraper) Channel() chan *dia.Trade
- func (scraper *MakerScraper) Close() error
- func (scraper *MakerScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *MakerScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (scraper *MakerScraper) GetNewTrades(pair string, startTradeID string) ([]MakerTrade, error)
- func (scraper *MakerScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *MakerScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type MakerTrade
- type MakerTradeResponse
- type Message
- type MultiChainConfig
- type OKEXArgs
- type OKEXMarket
- type OKEXWSResponse
- type OKExPairScraper
- type OKExScraper
- func (s *OKExScraper) Channel() chan *dia.Trade
- func (s *OKExScraper) Close() error
- func (s *OKExScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *OKExScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *OKExScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *OKExScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type OptionSettlement
- type OptionsScraper
- type PairIdMap
- type PairScraper
- type ParsedDeribitOptionOrderbookEntry
- type ParsedDeribitResponse
- type ParsedDeribitResponseParams
- type PongMessage
- type Pools
- type QuoinePairScraper
- type QuoineScraper
- func (pairScraper *QuoineScraper) Channel() chan *dia.Trade
- func (scraper *QuoineScraper) Close() error
- func (scraper *QuoineScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *QuoineScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *QuoineScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *QuoineScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type Response
- type ResponseGate
- type ResponseLBank
- type ResponseType
- type Responses
- type STEXAsset
- type STEXPairScraper
- type STEXScraper
- func (ps *STEXScraper) Channel() chan *dia.Trade
- func (s *STEXScraper) Close() error
- func (s *STEXScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *STEXScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *STEXScraper) GetNewTrades(pairID string, fromTimestamp time.Time) ([]STEXTrade, error)
- func (s *STEXScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *STEXScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type STEXTickerData
- type STEXTrade
- type SerumEvent
- type SerumEventQueueHeader
- type SerumPairScraper
- type SerumScraper
- func (s *SerumScraper) Channel() chan *dia.Trade
- func (s *SerumScraper) Close() error
- func (s *SerumScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *SerumScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *SerumScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *SerumScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type SimexAsset
- type SimexPairScraper
- type SimexScraper
- func (ps *SimexScraper) Channel() chan *dia.Trade
- func (s *SimexScraper) Close() error
- func (s *SimexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *SimexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
- func (s *SimexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *SimexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type SimexTicker
- type StexTradeResponse
- type Subscribe
- type SubscribeGate
- type SubscribeLBank
- type SubscribePing
- type Topic
- type Trade
- type UniswapHistoryPairScraper
- type UniswapHistoryScraper
- func (ps *UniswapHistoryScraper) Channel() chan *dia.Trade
- func (s *UniswapHistoryScraper) Close() error
- func (s *UniswapHistoryScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *UniswapHistoryScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *UniswapHistoryScraper) GetAllPairs() ([]UniswapPair, error)
- func (s *UniswapHistoryScraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
- func (s *UniswapHistoryScraper) GetName(tokenAddress common.Address) (name string, err error)
- func (s *UniswapHistoryScraper) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
- func (s *UniswapHistoryScraper) GetPairByID(num int64) (UniswapPair, error)
- func (up *UniswapHistoryScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *UniswapHistoryScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type UniswapPair
- type UniswapPairScraper
- type UniswapPairV3Scraper
- type UniswapScraper
- func (ps *UniswapScraper) Channel() chan *dia.Trade
- func (s *UniswapScraper) Close() error
- func (s *UniswapScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *UniswapScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *UniswapScraper) GetAllPairs() ([]UniswapPair, error)
- func (s *UniswapScraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
- func (s *UniswapScraper) GetName(tokenAddress common.Address) (name string, err error)
- func (s *UniswapScraper) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
- func (s *UniswapScraper) GetPairByID(num int64) (UniswapPair, error)
- func (s *UniswapScraper) GetSwapsChannel(pairAddress common.Address) (chan *uniswap.UniswapV2PairSwap, error)
- func (s *UniswapScraper) ListenToPair(i int, address common.Address, byAddress bool)
- func (up *UniswapScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *UniswapScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type UniswapSwap
- type UniswapToken
- type UniswapV3Scraper
- func (s *UniswapV3Scraper) Channel() chan *dia.Trade
- func (s *UniswapV3Scraper) Close() error
- func (s *UniswapV3Scraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *UniswapV3Scraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *UniswapV3Scraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
- func (s *UniswapV3Scraper) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
- func (s *UniswapV3Scraper) GetPairByTokenAddress(address0 common.Address, address1 common.Address, pairAddress common.Address) (pair UniswapPair, err error)
- func (s *UniswapV3Scraper) GetPairData(poolEvent *uniswapcontractv3.UniswapV3PoolCreated) (UniswapPair, error)
- func (s *UniswapV3Scraper) GetSwapsChannel(pairAddress common.Address) (chan *UniswapV3Pair.UniswapV3PairSwap, error)
- func (s *UniswapV3Scraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *UniswapV3Scraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type UniswapV3Swap
- type WebSocketRequest
- type WebSocketResponse
- type XMLCube
- type XMLCubeTime
- type XMLEnvelope
- type XMLHistoricalEnvelope
- type XMLObs
- type XMLObsDimension
- type XMLObsValue
- type ZBPairScraper
- type ZBScraper
- func (ps *ZBScraper) Channel() chan *dia.Trade
- func (s *ZBScraper) Close() error
- func (s *ZBScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (s *ZBScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *ZBScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (s *ZBScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type ZBSubscribe
- type ZBTradeResponse
- type ZeroxPairScraper
- type ZeroxScraper
- func (scraper *ZeroxScraper) Channel() chan *dia.Trade
- func (scraper *ZeroxScraper) Close() error
- func (scraper *ZeroxScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
- func (scraper *ZeroxScraper) FetchTickerData(symbol string) (dia.Asset, error)
- func (scraper *ZeroxScraper) FillSymbolData(symbol string) (dia.Asset, error)
- func (s *ZeroxScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
- func (scraper *ZeroxScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
- type ZeroxToken
Constants ¶
const ( BalancerApiDelay = 20 BalancerBatchDelay = 60 * 1 )
const ( ChannelHeartbeat = "heartbeat" ChannelTicker = "ticker" ChannelLevel2 = "level2" ChannelUser = "user" ChannelMatches = "matches" ChannelFull = "full" )
const ( API_DELAY = 1*time.Second + 500*time.Millisecond EXECUTION_LIMIT = 200 )
const ( Fill = EventFlag(1 << iota) Out Bid Maker )
const (
BinanceUSWsURL = "wss://stream.binance.us:9443/ws"
)
const (
MakerBatchDelay = 60 * 1
)
const WS_TIMEOUT = 10 * time.Second
Variables ¶
var BitBaySocketURL string = "wss://api.zonda.exchange/websocket/"
var ByBitSocketURL string = "wss://stream.bybit.com/realtime"
var Exchanges = make(map[string]dia.Exchange)
var LiquidSocketRestURL string = "http://api.liquid.com"
var LiquidSocketURL string = "wss://tap.liquid.com/app/LiquidTapClient"
var ZBSocketURL string = "wss://api.zb.live/websocket"
Functions ¶
func AllFuturesMarketsHuobi ¶
func AllFuturesMarketsHuobi() []string
AllFuturesMarketsHuobi - returns all the futures markets tradable on Huobi. Lists all of the Huobi Futures markets. TODO: add a REST HTTP call to obtain the list of trdabale markets.
func FloatToString ¶
func GetDecimals ¶ added in v1.4.2
func GzipDecode ¶
func InitialiseRestClientsMap ¶ added in v1.4.2
func InitialiseRestClientsMap()
func InitialiseWsClientsMap ¶ added in v1.4.2
func InitialiseWsClientsMap()
Types ¶
type APIScraper ¶
type APIScraper interface { io.Closer // ScrapePair returns a PairScraper that continuously scrapes trades for a // single pair from this APIScraper ScrapePair(pair dia.ExchangePair) (PairScraper, error) // FetchAvailablePairs returns a list with all trading pairs available on // the exchange associated to the APIScraper. The format is such that it can // be used by the corr. pairScraper in order to fetch trades. FetchAvailablePairs() ([]dia.ExchangePair, error) // FillSymbolData collects information associated to the symbol ticker of an // asset traded on the exchange associated to the APIScraper. // Ideally, data is returned as close to original (blockchain) notation as possible. // This is only needed for CEX. For DEX the trade can be filled. FillSymbolData(symbol string) (dia.Asset, error) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error) // Channel returns a channel that can be used to receive trades Channel() chan *dia.Trade }
APIScraper provides common methods needed to get Trade information from exchange APIs.
func NewAPIScraper ¶
func NewAPIScraper(exchange string, scrape bool, key string, secret string, relDB *models.RelDB) APIScraper
NewAPIScraper returns an API scraper for @exchange. If scrape==true it actually does scraping. Otherwise can be used for pairdiscovery.
type AllOKEXMarketResponse ¶
type AllOKEXMarketResponse struct { Code string `json:"code"` Data []OKEXMarket `json:"data"` Msg string `json:"msg"` }
type AnyswapPair ¶ added in v1.4.0
type AnyswapPair struct { Token0 UniswapToken Token1 UniswapToken ForeignName string Address common.Address }
type AnyswapPairScraper ¶ added in v1.4.0
type AnyswapPairScraper struct {
// contains filtered or unexported fields
}
UniswapPairScraper implements PairScraper for Uniswap
func (*AnyswapPairScraper) Close ¶ added in v1.4.0
func (ps *AnyswapPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*AnyswapPairScraper) Error ¶ added in v1.4.0
func (ps *AnyswapPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*AnyswapPairScraper) Pair ¶ added in v1.4.0
func (ps *AnyswapPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type AnyswapScraper ¶ added in v1.4.0
type AnyswapScraper struct { WsClientMap map[string]*ethclient.Client RestClientMap map[string]*ethclient.Client // contains filtered or unexported fields }
func NewAnyswapScraper ¶ added in v1.4.0
NewUniswapScraper returns a new UniswapScraper for the given pair
func (*AnyswapScraper) Channel ¶ added in v1.4.0
func (ps *AnyswapScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*AnyswapScraper) Close ¶ added in v1.4.0
func (s *AnyswapScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*AnyswapScraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *AnyswapScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs as dia.ExchangePair for the pairDiscorvery service
func (*AnyswapScraper) FillSymbolData ¶ added in v1.4.0
func (s *AnyswapScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData is not used by DEX scrapers.
func (*AnyswapScraper) GetSwapOutChannel ¶ added in v1.4.0
func (s *AnyswapScraper) GetSwapOutChannel(tokens []common.Address, chainID string) (chan *anyswap.AnyswapV4RouterLogAnySwapOut, error)
GetSwapOutChannel returns the channel @sink delivering the events LogAnySwapOut.
func (*AnyswapScraper) ListenToChainOut ¶ added in v1.4.0
func (s *AnyswapScraper) ListenToChainOut(chainID string)
ListenToChainOut screens swaps out of the chain with @chainID to any other chain offered by Anyswap.
func (*AnyswapScraper) NormalizePair ¶ added in v1.4.0
func (up *AnyswapScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*AnyswapScraper) ScrapePair ¶ added in v1.4.0
func (s *AnyswapScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type AnyswapSwap ¶ added in v1.4.0
type AnyswapToken ¶ added in v1.4.0
type BalancerPairScraper ¶
type BalancerPairScraper struct {
// contains filtered or unexported fields
}
func (*BalancerPairScraper) Close ¶
func (pairScraper *BalancerPairScraper) Close() error
func (*BalancerPairScraper) Error ¶
func (pairScraper *BalancerPairScraper) Error() error
func (*BalancerPairScraper) Pair ¶
func (pairScraper *BalancerPairScraper) Pair() dia.ExchangePair
type BalancerScraper ¶
type BalancerScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewBalancerScraper ¶
func NewBalancerScraper(exchange dia.Exchange, scrape bool) *BalancerScraper
func (*BalancerScraper) Channel ¶
func (scraper *BalancerScraper) Channel() chan *dia.Trade
func (*BalancerScraper) Close ¶
func (scraper *BalancerScraper) Close() error
func (*BalancerScraper) FetchAvailablePairs ¶
func (scraper *BalancerScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs get pairs by getting all the LOGNEWPOOL contract events, and calling the method getCurrentTokens from each pool contract
func (*BalancerScraper) FillSymbolData ¶
func (scraper *BalancerScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*BalancerScraper) NormalizePair ¶
func (s *BalancerScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BalancerScraper) ScrapePair ¶
func (scraper *BalancerScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type BalancerSwap ¶
type BalancerToken ¶
type BalancerV2PairScraper ¶ added in v1.4.0
type BalancerV2PairScraper struct {
// contains filtered or unexported fields
}
BalancerV2PairScraper implements PairScraper for BalancerV2
func (*BalancerV2PairScraper) Close ¶ added in v1.4.0
func (p *BalancerV2PairScraper) Close() error
Close stops listening for trades of the pair associated with the BalancerV2Scraper
func (*BalancerV2PairScraper) Error ¶ added in v1.4.0
func (p *BalancerV2PairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BalancerV2PairScraper) Pair ¶ added in v1.4.0
func (p *BalancerV2PairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BalancerV2Scraper ¶ added in v1.4.0
type BalancerV2Scraper struct {
// contains filtered or unexported fields
}
BalancerV2Scraper is a scraper for Balancer V2
func NewBalancerV2Scraper ¶ added in v1.4.0
func NewBalancerV2Scraper(exchange dia.Exchange, scrape bool) *BalancerV2Scraper
NewBalancerV2Scraper returns a Balancer V2 scraper
func (*BalancerV2Scraper) Channel ¶ added in v1.4.0
func (s *BalancerV2Scraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BalancerV2Scraper) Close ¶ added in v1.4.0
func (s *BalancerV2Scraper) Close() error
Close unsubscribes data and closes any existing WebSocket connections, as well as channels of BalancerV2Scraper
func (*BalancerV2Scraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *BalancerV2Scraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*BalancerV2Scraper) FillSymbolData ¶ added in v1.4.0
func (s *BalancerV2Scraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData adds the name to the asset underlying @symbol on BalancerV2
func (*BalancerV2Scraper) NormalizePair ¶ added in v1.4.0
func (s *BalancerV2Scraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BalancerV2Scraper) ScrapePair ¶ added in v1.4.0
func (s *BalancerV2Scraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from the BalancerV2 scraper
type BalancerV2Swap ¶ added in v1.4.0
type BalancerV2Swap struct { SellToken string BuyToken string SellVolume float64 BuyVolume float64 ID string Timestamp int64 }
BalancerV2Swap is a swap information
type BancorPairScraper ¶
type BancorPairScraper struct {
// contains filtered or unexported fields
}
func (*BancorPairScraper) Close ¶
func (pairScraper *BancorPairScraper) Close() error
func (*BancorPairScraper) Error ¶
func (pairScraper *BancorPairScraper) Error() error
func (*BancorPairScraper) Pair ¶
func (pairScraper *BancorPairScraper) Pair() dia.ExchangePair
type BancorPool ¶
type BancorPool struct { Reserves []struct { DltID string `json:"dlt_id"` Symbol string `json:"symbol"` Name string `json:"name"` Balance struct { Usd string `json:"usd"` } `json:"balance"` Weight int `json:"weight"` Price struct { Usd string `json:"usd"` } `json:"price"` Price24HAgo struct { Usd string `json:"usd"` } `json:"price_24h_ago"` Volume24H struct { Usd string `json:"usd"` Base string `json:"base"` } `json:"volume_24h"` } `json:"reserves"` DltType string `json:"dlt_type"` DltID string `json:"dlt_id"` Type int `json:"type"` Version int `json:"version"` Symbol string `json:"symbol"` Name string `json:"name"` Supply string `json:"supply"` ConverterDltID string `json:"converter_dlt_id"` ConversionFee string `json:"conversion_fee"` Liquidity struct { Usd string `json:"usd"` } `json:"liquidity"` Volume24H struct { Usd string `json:"usd"` } `json:"volume_24h"` Fees24H struct { Usd string `json:"usd"` } `json:"fees_24h"` }
type BancorPools ¶
type BancorPools struct { Data []BancorPool `json:"data"` Timestamp struct { Ethereum struct { Block int `json:"block"` Timestamp int64 `json:"timestamp"` } `json:"ethereum"` } `json:"timestamp"` }
type BancorScraper ¶
type BancorScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewBancorScraper ¶
func NewBancorScraper(exchange dia.Exchange, scrape bool) *BancorScraper
func (*BancorScraper) Channel ¶
func (scraper *BancorScraper) Channel() chan *dia.Trade
func (*BancorScraper) Close ¶
func (scraper *BancorScraper) Close() error
func (*BancorScraper) ConverterTypeFour ¶
func (*BancorScraper) ConverterTypeOne ¶
func (*BancorScraper) ConverterTypeThree ¶
func (*BancorScraper) ConverterTypeZero ¶
func (*BancorScraper) FetchAvailablePairs ¶
func (scraper *BancorScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*BancorScraper) FillSymbolData ¶
func (scraper *BancorScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*BancorScraper) GetConversion ¶
func (scraper *BancorScraper) GetConversion() (chan *BancorNetwork.BancorNetworkConversion, error)
func (*BancorScraper) GetPair ¶
func (scraper *BancorScraper) GetPair(address []common.Address) dia.ExchangePair
func (*BancorScraper) GetpoolAddress ¶
func (scraper *BancorScraper) GetpoolAddress()
func (*BancorScraper) NormalizePair ¶
func (scraper *BancorScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BancorScraper) ScrapePair ¶
func (scraper *BancorScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type BancorSwap ¶
type BinancePairScraper ¶
type BinancePairScraper struct {
// contains filtered or unexported fields
}
BinancePairScraper implements PairScraper for Binance
func (*BinancePairScraper) Close ¶
func (ps *BinancePairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*BinancePairScraper) Error ¶
func (ps *BinancePairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BinancePairScraper) Pair ¶
func (ps *BinancePairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BinanceScraper ¶
type BinanceScraper struct {
// contains filtered or unexported fields
}
BinanceScraper is a Scraper for collecting trades from the Binance websocket API
func NewBinanceScraper ¶
func NewBinanceScraper(apiKey string, secretKey string, exchange dia.Exchange, scrape bool, relDB *models.RelDB) *BinanceScraper
NewBinanceScraper returns a new BinanceScraper for the given pair
func (*BinanceScraper) Channel ¶
func (ps *BinanceScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BinanceScraper) Close ¶
func (s *BinanceScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*BinanceScraper) FetchAvailablePairs ¶
func (s *BinanceScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*BinanceScraper) FillSymbolData ¶
func (s *BinanceScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*BinanceScraper) NormalizePair ¶
func (up *BinanceScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BinanceScraper) ScrapePair ¶
func (s *BinanceScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type BinanceScraperUS ¶ added in v1.4.2
type BinanceScraperUS struct {
// contains filtered or unexported fields
}
BinanceScraperUS is a Scraper for collecting trades from the Binance websocket API
func NewBinanceScraperUS ¶ added in v1.4.2
func NewBinanceScraperUS(apiKey string, secretKey string, exchange dia.Exchange, scrape bool, relDB *models.RelDB) *BinanceScraperUS
NewBinanceScraperUS returns a new BinanceScraperUS for the given pair
func (*BinanceScraperUS) Channel ¶ added in v1.4.2
func (ps *BinanceScraperUS) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BinanceScraperUS) Close ¶ added in v1.4.2
func (s *BinanceScraperUS) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*BinanceScraperUS) FetchAvailablePairs ¶ added in v1.4.2
func (s *BinanceScraperUS) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*BinanceScraperUS) FillSymbolData ¶ added in v1.4.2
func (s *BinanceScraperUS) FillSymbolData(symbol string) (dia.Asset, error)
func (*BinanceScraperUS) NormalizePair ¶ added in v1.4.2
func (up *BinanceScraperUS) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BinanceScraperUS) ScrapePair ¶ added in v1.4.2
func (s *BinanceScraperUS) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type BinanceUSPairScraper ¶ added in v1.4.2
type BinanceUSPairScraper struct {
// contains filtered or unexported fields
}
BinanceUSPairScraper implements PairScraper for Binance
func (*BinanceUSPairScraper) Close ¶ added in v1.4.2
func (ps *BinanceUSPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*BinanceUSPairScraper) Error ¶ added in v1.4.2
func (ps *BinanceUSPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BinanceUSPairScraper) Pair ¶ added in v1.4.2
func (ps *BinanceUSPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BinanceUSPairScraperSet ¶ added in v1.4.2
type BinanceUSPairScraperSet map[*BinanceUSPairScraper]nothing
type BitBayMarket ¶
type BitBayMarket struct { Code string `json:"code"` First struct { Currency string `json:"currency"` MinOffer string `json:"minOffer"` Scale int `json:"scale"` } `json:"first"` Second struct { Currency string `json:"currency"` MinOffer string `json:"minOffer"` Scale int `json:"scale"` } `json:"second"` }
type BitBayMarkets ¶
type BitBayMarkets struct { Status string `json:"status"` Items map[string]BitBayMarket `json:"items"` }
type BitBayPairScraper ¶
type BitBayPairScraper struct {
// contains filtered or unexported fields
}
BitBayPairScraper implements PairScraper for BitBay
func (*BitBayPairScraper) Close ¶
func (ps *BitBayPairScraper) Close() error
Close stops listening for trades of the pair associated
func (*BitBayPairScraper) Error ¶
func (ps *BitBayPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BitBayPairScraper) Pair ¶
func (ps *BitBayPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BitBayScraper ¶
type BitBayScraper struct {
// contains filtered or unexported fields
}
BitBayScraper provides methods needed to get Trade information from BitBay
func NewBitBayScraper ¶
NewBitBayScraper get a scrapper for BitBay exchange
func (*BitBayScraper) Channel ¶
func (s *BitBayScraper) Channel() chan *dia.Trade
Channel returns the channel to get trades
func (*BitBayScraper) Close ¶
func (s *BitBayScraper) Close() error
Close any existing API connections, as well as channels, and terminates main loop
func (*BitBayScraper) Error ¶
func (s *BitBayScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BitBayScraper) FetchAvailablePairs ¶
func (s *BitBayScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*BitBayScraper) FillSymbolData ¶
func (s *BitBayScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*BitBayScraper) NormalizePair ¶
func (s *BitBayScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BitBayScraper) ScrapePair ¶
func (s *BitBayScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type BitBaySubscribe ¶
type BitBayTrade ¶
type BitBayTrade struct { Date int64 `json:"date"` Price float64 `json:"price"` TransactionType string `json:"type"` Amount float64 `json:"amount"` Tid string `json:"tid"` }
TradeInfo as received from API response
type BitBayTransaction ¶
type BitBayWSResponse ¶
type BitMaxAsset ¶
type BitMaxAsset struct { AssetCode string `json:"assetCode"` AssetName string `json:"assetName"` PrecisionScale int `json:"precisionScale"` NativeScale int `json:"nativeScale"` WithdrawalFee string `json:"withdrawalFee"` MinWithdrawalAmt string `json:"minWithdrawalAmt"` Status string `json:"status"` }
type BitMaxAssets ¶
type BitMaxAssets struct { Code int `json:"code"` Data []BitMaxAsset `json:"data"` }
type BitMaxPair ¶
type BitMaxPair struct { Symbol string `json:"symbol"` DisplayName string `json:"displayName"` BaseAsset string `json:"baseAsset"` QuoteAsset string `json:"quoteAsset"` Status string `json:"status"` MinNotional string `json:"minNotional"` MaxNotional string `json:"maxNotional"` MarginTradable bool `json:"marginTradable"` CommissionType string `json:"commissionType"` CommissionReserveRate string `json:"commissionReserveRate"` TickSize string `json:"tickSize"` LotSize string `json:"lotSize"` }
type BitMaxPairResponse ¶
type BitMaxPairResponse struct { Code int `json:"code"` Data []BitMaxPair `json:"data"` }
type BitMaxPairScraper ¶
type BitMaxPairScraper struct {
// contains filtered or unexported fields
}
BitMax implements PairScraper for BitMax
func (*BitMaxPairScraper) Close ¶
func (ps *BitMaxPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*BitMaxPairScraper) Error ¶
func (ps *BitMaxPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BitMaxPairScraper) Pair ¶
func (ps *BitMaxPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BitMaxRequest ¶
type BitMaxScraper ¶
type BitMaxScraper struct {
// contains filtered or unexported fields
}
func NewBitMaxScraper ¶
func (*BitMaxScraper) Channel ¶
func (ps *BitMaxScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BitMaxScraper) Close ¶
func (s *BitMaxScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*BitMaxScraper) FetchAvailablePairs ¶
func (s *BitMaxScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*BitMaxScraper) FillSymbolData ¶
func (s *BitMaxScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FillSymbolData collects all available information on an asset traded on Bitmax
func (*BitMaxScraper) NormalizePair ¶
func (s *BitMaxScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BitMaxScraper) ScrapePair ¶
func (s *BitMaxScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type BitMaxTradeResponse ¶
type BitMexPairScraper ¶ added in v1.4.0
type BitMexPairScraper struct {
// contains filtered or unexported fields
}
BitMexPairScraper implements PairScraper for BitMex
func (*BitMexPairScraper) Close ¶ added in v1.4.0
func (p *BitMexPairScraper) Close() error
Close stops listening for trades of the pair associated with the BitMex scraper
func (*BitMexPairScraper) Error ¶ added in v1.4.0
func (p *BitMexPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BitMexPairScraper) Pair ¶ added in v1.4.0
func (p *BitMexPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BitMexScraper ¶ added in v1.4.0
type BitMexScraper struct {
// contains filtered or unexported fields
}
BitMexScraper is a scraper for bitmex.com
func NewBitMexScraper ¶ added in v1.4.0
NewBitMexScraper returns a new BitMex scraper
func (*BitMexScraper) Channel ¶ added in v1.4.0
func (s *BitMexScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BitMexScraper) Close ¶ added in v1.4.0
func (s *BitMexScraper) Close() error
Close unsubscribes data and closes any existing WebSocket connections, as well as channels of BitMexScraper
func (*BitMexScraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *BitMexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns all traded pairs on BitMex
func (*BitMexScraper) FillSymbolData ¶ added in v1.4.0
func (s *BitMexScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData adds the name to the asset underlying @symbol on BitMex
func (*BitMexScraper) NormalizePair ¶ added in v1.4.0
func (s *BitMexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BitMexScraper) ScrapePair ¶ added in v1.4.0
func (s *BitMexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from the BitMex scraper
type BitfinexPairScraper ¶
type BitfinexPairScraper struct {
// contains filtered or unexported fields
}
BitfinexPairScraper implements PairScraper for Bitfinex
func (*BitfinexPairScraper) Close ¶
func (ps *BitfinexPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*BitfinexPairScraper) Error ¶
func (ps *BitfinexPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BitfinexPairScraper) Pair ¶
func (ps *BitfinexPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BitfinexScraper ¶
type BitfinexScraper struct {
// contains filtered or unexported fields
}
BitfinexScraper is a Scraper for collecting trades from the Bitfinex websocket API
func NewBitfinexScraper ¶
func NewBitfinexScraper(key string, secret string, exchange dia.Exchange, scrape bool, relDB *models.RelDB) *BitfinexScraper
NewBitfinexScraper returns a new BitfinexScraper for the given pair
func (*BitfinexScraper) Channel ¶
func (ps *BitfinexScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BitfinexScraper) Close ¶
func (s *BitfinexScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*BitfinexScraper) FetchAvailablePairs ¶
func (s *BitfinexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*BitfinexScraper) FillSymbolData ¶
func (s *BitfinexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
func (*BitfinexScraper) NormalizePair ¶
func (s *BitfinexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BitfinexScraper) ScrapePair ¶
func (s *BitfinexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type BitflyerScraper ¶
type BitflyerScraper struct { Markets []string WaitGroup *sync.WaitGroup Writer writers.Writer Logger *zap.SugaredLogger }
BitflyerScraper - use the NewBitflyerFuturesScraper function to create an instance
func (*BitflyerScraper) Authenticate ¶
func (s *BitflyerScraper) Authenticate(market string, connection interface{}) error
Authenticate - placeholder here, since we do not need to authneticate the connection.
func (*BitflyerScraper) Scrape ¶
func (s *BitflyerScraper) Scrape(market string)
Scrape starts a websocket scraper for market
func (*BitflyerScraper) ScrapeMarkets ¶
func (s *BitflyerScraper) ScrapeMarkets()
ScrapeMarkets - will scrape the markets specified during instantiation
func (*BitflyerScraper) ScraperClose ¶
func (s *BitflyerScraper) ScraperClose(market string, connection interface{}) error
ScraperClose - safely closes the scraper; We pass the interface connection as the second argument primarily for the reason that Huobi scraper does not use the gorilla websocket; It uses golang's x websocket; If we did not define this method in our FuturesScraper interface, we could have easily used the pointer to gorilla websocket here; However, to make FuturesScraper more ubiquituous, we need an interface here.
type BitforexPairScraper ¶ added in v1.4.0
type BitforexPairScraper struct {
// contains filtered or unexported fields
}
BitforexPairScraper implements PairScraper for Crypto.com
func (*BitforexPairScraper) Close ¶ added in v1.4.0
func (p *BitforexPairScraper) Close() error
Close stops listening for trades of the pair associated with the Crypto.com scraper
func (*BitforexPairScraper) Error ¶ added in v1.4.0
func (p *BitforexPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BitforexPairScraper) Pair ¶ added in v1.4.0
func (p *BitforexPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BitforexScraper ¶ added in v1.4.0
type BitforexScraper struct {
// contains filtered or unexported fields
}
BitforexScraper is a scraper for Crypto.com
func NewBitforexScraper ¶ added in v1.4.0
NewBitforexScraper returns a new Crypto.com scraper
func (*BitforexScraper) Channel ¶ added in v1.4.0
func (s *BitforexScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BitforexScraper) Close ¶ added in v1.4.0
func (s *BitforexScraper) Close() error
Close unsubscribes data and closes any existing WebSocket connections, as well as channels of BitforexScraper
func (*BitforexScraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *BitforexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns all traded pairs on Crypto.com
func (*BitforexScraper) FillSymbolData ¶ added in v1.4.0
func (s *BitforexScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData adds the name to the asset underlying @symbol on Crypto.com
func (*BitforexScraper) NormalizePair ¶ added in v1.4.0
func (s *BitforexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BitforexScraper) ScrapePair ¶ added in v1.4.0
func (s *BitforexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from the Crypto.com scraper
type BitmexScraper ¶
type BitmexScraper struct { Markets []string WaitGroup *sync.WaitGroup Writer writers.Writer Logger *zap.SugaredLogger }
BitmexScraper - use the NewBitmexFuturesScraper function to create an instance
func (*BitmexScraper) Authenticate ¶
func (s *BitmexScraper) Authenticate(market string, connection interface{}) error
Authenticate - placeholder here, since we do not need to authneticate the connection.
func (*BitmexScraper) Scrape ¶
func (s *BitmexScraper) Scrape(market string)
Scrape starts a websocket scraper for market
func (*BitmexScraper) ScrapeMarkets ¶
func (s *BitmexScraper) ScrapeMarkets()
ScrapeMarkets - will scrape the markets specified during instantiation
func (*BitmexScraper) ScraperClose ¶
func (s *BitmexScraper) ScraperClose(market string, connection interface{}) error
ScraperClose - safely closes the scraper; We pass the interface connection as the second argument primarily for the reason that Huobi scraper does not use the gorilla websocket; It uses golang's x websocket; If we did not define this method in our FuturesScraper interface, we could have easily used the pointer to gorilla websocket here; However, to make FuturesScraper more ubiquituous, we need an interface here.
type BittrexPairScraper ¶
type BittrexPairScraper struct {
// contains filtered or unexported fields
}
BittrexPairScraper implements PairScraper for Bittrex
func (*BittrexPairScraper) Close ¶
func (p *BittrexPairScraper) Close() error
Close stops listening for trades of the pair associated with the Bittrex scraper
func (*BittrexPairScraper) Error ¶
func (p *BittrexPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BittrexPairScraper) Pair ¶
func (p *BittrexPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BittrexScraper ¶
type BittrexScraper struct {
// contains filtered or unexported fields
}
func NewBittrexScraper ¶
func (*BittrexScraper) Channel ¶
func (s *BittrexScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*BittrexScraper) Close ¶
func (s *BittrexScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*BittrexScraper) FetchAvailablePairs ¶
func (s *BittrexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*BittrexScraper) FillSymbolData ¶
func (s *BittrexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FillSymbolData adds the name to the asset underlying @symbol on Bittrex
func (*BittrexScraper) NormalizePair ¶
func (s *BittrexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BittrexScraper) ScrapePair ¶
func (s *BittrexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from the Bittrex scraper
type BridgeSwapPair ¶ added in v1.4.2
type BridgeSwapPair struct { Token0 BridgeSwapToken Token1 BridgeSwapToken ForeignName string Address common.Address }
type BridgeSwapPairScraper ¶ added in v1.4.2
type BridgeSwapPairScraper struct {
// contains filtered or unexported fields
}
BridgeSwapPairScraper implements PairScraper for Uniswap
func (*BridgeSwapPairScraper) Close ¶ added in v1.4.2
func (ps *BridgeSwapPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*BridgeSwapPairScraper) Error ¶ added in v1.4.2
func (ps *BridgeSwapPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*BridgeSwapPairScraper) Pair ¶ added in v1.4.2
func (ps *BridgeSwapPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type BridgeSwapScraper ¶ added in v1.4.2
type BridgeSwapScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewBridgeSwapScraper ¶ added in v1.4.2
func NewBridgeSwapScraper(exchange dia.Exchange, scrape bool, relDB *models.RelDB) *BridgeSwapScraper
NewBridgeSwapScraper returns a new BridgeSwapScraper for the given pair
func (*BridgeSwapScraper) Channel ¶ added in v1.4.2
func (ps *BridgeSwapScraper) Channel() chan *dia.Trade
func (*BridgeSwapScraper) Close ¶ added in v1.4.2
func (s *BridgeSwapScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*BridgeSwapScraper) FetchAvailablePairs ¶ added in v1.4.2
func (b *BridgeSwapScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*BridgeSwapScraper) FillSymbolData ¶ added in v1.4.2
func (s *BridgeSwapScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*BridgeSwapScraper) NormalizePair ¶ added in v1.4.2
func (up *BridgeSwapScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*BridgeSwapScraper) ScrapePair ¶ added in v1.4.2
func (s *BridgeSwapScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type BridgeSwapSwap ¶ added in v1.4.2
type BridgeSwapToken ¶ added in v1.4.2
type ByBitMarket ¶ added in v1.4.0
type ByBitMarket struct { Name string `json:"name"` Alias string `json:"alias"` Status string `json:"status"` BaseCurrency string `json:"base_currency"` QuoteCurrency string `json:"quote_currency"` PriceScale int `json:"price_scale"` TakerFee string `json:"taker_fee"` MakerFee string `json:"maker_fee"` LeverageFilter struct { MinLeverage int `json:"min_leverage"` MaxLeverage int `json:"max_leverage"` LeverageStep string `json:"leverage_step"` } `json:"leverage_filter"` PriceFilter struct { MinPrice string `json:"min_price"` MaxPrice string `json:"max_price"` TickSize string `json:"tick_size"` } `json:"price_filter"` LotSizeFilter struct { MaxTradingQty float64 `json:"max_trading_qty"` MinTradingQty float64 `json:"min_trading_qty"` QtyStep float64 `json:"qty_step"` } `json:"lot_size_filter"` }
type ByBitMarketsResponse ¶ added in v1.4.0
type ByBitPairScraper ¶ added in v1.4.0
type ByBitPairScraper struct {
// contains filtered or unexported fields
}
ByBitPairScraper implements PairScraper for ByBit
func (*ByBitPairScraper) Close ¶ added in v1.4.0
func (ps *ByBitPairScraper) Close() error
Close stops listening for trades of the pair associated
func (*ByBitPairScraper) Error ¶ added in v1.4.0
func (ps *ByBitPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*ByBitPairScraper) Pair ¶ added in v1.4.0
func (ps *ByBitPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type ByBitScraper ¶ added in v1.4.0
type ByBitScraper struct {
// contains filtered or unexported fields
}
ByBitScraper provides methods needed to get Trade information from ByBit
func NewByBitScraper ¶ added in v1.4.0
NewByBitScraper get a scrapper for ByBit exchange
func (*ByBitScraper) Channel ¶ added in v1.4.0
func (s *ByBitScraper) Channel() chan *dia.Trade
Channel returns the channel to get trades
func (*ByBitScraper) Close ¶ added in v1.4.0
func (s *ByBitScraper) Close() error
Close any existing API connections, as well as channels, and terminates main loop
func (*ByBitScraper) Error ¶ added in v1.4.0
func (s *ByBitScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*ByBitScraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *ByBitScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*ByBitScraper) FillSymbolData ¶ added in v1.4.0
func (s *ByBitScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*ByBitScraper) NormalizePair ¶ added in v1.4.0
func (s *ByBitScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*ByBitScraper) ScrapePair ¶ added in v1.4.0
func (s *ByBitScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type ByBitSubscribe ¶ added in v1.4.0
type ByBitTradeResponse ¶ added in v1.4.0
type ByBitTradeResponse struct { Topic string `json:"topic"` Data []struct { Timestamp string `json:"timestamp"` TradeTimeMs int64 `json:"trade_time_ms"` Symbol string `json:"symbol"` Side string `json:"side"` Size float64 `json:"size"` Price float64 `json:"price"` TickDirection string `json:"tick_direction"` TradeID string `json:"trade_id"` CrossSeq int `json:"cross_seq"` } `json:"data"` }
type CREX24ApiInstrument ¶
type CREX24ApiTrade ¶
type CREX24ApiTradeUpdate ¶
type CREX24ApiTradeUpdate struct { I string NT []CREX24ApiTrade }
type CREX24PairScraper ¶
type CREX24PairScraper struct {
// contains filtered or unexported fields
}
func (*CREX24PairScraper) Close ¶
func (ps *CREX24PairScraper) Close() error
func (*CREX24PairScraper) Error ¶
func (ps *CREX24PairScraper) Error() error
func (*CREX24PairScraper) Pair ¶
func (ps *CREX24PairScraper) Pair() dia.ExchangePair
type CREX24Scraper ¶
type CREX24Scraper struct {
// contains filtered or unexported fields
}
CREX24 Scraper is a scraper for collecting trades from the CREX24 signalR api
func NewCREX24Scraper ¶
func NewCREX24Scraper(exchange dia.Exchange, relDB *models.RelDB) *CREX24Scraper
func (*CREX24Scraper) Channel ¶
func (s *CREX24Scraper) Channel() chan *dia.Trade
func (*CREX24Scraper) Close ¶
func (s *CREX24Scraper) Close() error
func (*CREX24Scraper) FetchAvailablePairs ¶
func (s *CREX24Scraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*CREX24Scraper) FillSymbolData ¶
func (s *CREX24Scraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FillSymbolData collects all available information on an asset traded on CREX24
func (*CREX24Scraper) NormalizePair ¶
func (s *CREX24Scraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*CREX24Scraper) ScrapePair ¶
func (s *CREX24Scraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type CREX4Asset ¶
type CREX4Asset []struct { Symbol string `json:"symbol"` Name string `json:"name"` IsFiat bool `json:"isFiat"` DepositsAllowed bool `json:"depositsAllowed"` DepositConfirmationCount int `json:"depositConfirmationCount"` MinDeposit float64 `json:"minDeposit"` WithdrawalsAllowed bool `json:"withdrawalsAllowed"` WithdrawalPrecision int `json:"withdrawalPrecision"` MinWithdrawal float64 `json:"minWithdrawal"` MaxWithdrawal float64 `json:"maxWithdrawal"` IsDelisted bool `json:"isDelisted"` Transports interface{} `json:"transports"` }
type CoinBasePairScraper ¶
type CoinBasePairScraper struct {
// contains filtered or unexported fields
}
CoinBasePairScraper implements PairScraper for GDax
func (*CoinBasePairScraper) Close ¶
func (ps *CoinBasePairScraper) Close() error
func (*CoinBasePairScraper) Error ¶
func (ps *CoinBasePairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*CoinBasePairScraper) Pair ¶
func (ps *CoinBasePairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type CoinBaseScraper ¶
type CoinBaseScraper struct {
// contains filtered or unexported fields
}
func NewCoinBaseScraper ¶
NewCoinBaseScraper returns a new CoinBaseScraper initialized with default values. The instance is asynchronously scraping as soon as it is created.
func (*CoinBaseScraper) Channel ¶
func (ps *CoinBaseScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades/pricing information
func (*CoinBaseScraper) Close ¶
func (s *CoinBaseScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*CoinBaseScraper) FetchAvailablePairs ¶
func (s *CoinBaseScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*CoinBaseScraper) FillSymbolData ¶
func (s *CoinBaseScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FillSymbolData collects all available information on an asset traded on CoinBase
func (*CoinBaseScraper) NormalizePair ¶
func (s *CoinBaseScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*CoinBaseScraper) ScrapePair ¶
func (s *CoinBaseScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type CoinflexFuturesScraper ¶
type CoinflexFuturesScraper struct { Markets []string WaitGroup *sync.WaitGroup Writer writers.Writer Logger *zap.SugaredLogger }
CoinflexFuturesScraper - scrapes the futures from the Coinflex exchange
func (*CoinflexFuturesScraper) Authenticate ¶
func (s *CoinflexFuturesScraper) Authenticate(market string, connection interface{}) error
Authenticate - placeholder here, since we do not need to authneticate the connection.
func (*CoinflexFuturesScraper) Scrape ¶
func (s *CoinflexFuturesScraper) Scrape(market string)
Scrape starts a websocket scraper for market
func (*CoinflexFuturesScraper) ScrapeMarkets ¶
func (s *CoinflexFuturesScraper) ScrapeMarkets()
ScrapeMarkets - will scrape the markets specified during instantiation
func (*CoinflexFuturesScraper) ScraperClose ¶
func (s *CoinflexFuturesScraper) ScraperClose(market string, connection interface{}) error
ScraperClose - safely closes the scraper; We pass the interface connection as the second argument primarily for the reason that Huobi scraper does not use the gorilla websocket; It uses golang's x websocket; If we did not define this method in our FuturesScraper interface, we could have easily used the pointer to gorilla websocket here; However, to make FuturesScraper more ubiquituous, we need an interface here.
type ComputedCVI ¶
ComputedCVI is a struct representing our CVI value at a point in time
type ComputedCVIs ¶
type ComputedCVIs chan ComputedCVI
ComputedCVIs is the channel type that will communicate the cvis
type CryptoDotComPairScraper ¶ added in v1.4.0
type CryptoDotComPairScraper struct {
// contains filtered or unexported fields
}
CryptoDotComPairScraper implements PairScraper for Crypto.com
func (*CryptoDotComPairScraper) Close ¶ added in v1.4.0
func (p *CryptoDotComPairScraper) Close() error
Close stops listening for trades of the pair associated with the Crypto.com scraper
func (*CryptoDotComPairScraper) Error ¶ added in v1.4.0
func (p *CryptoDotComPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*CryptoDotComPairScraper) Pair ¶ added in v1.4.0
func (p *CryptoDotComPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type CryptoDotComScraper ¶ added in v1.4.0
type CryptoDotComScraper struct {
// contains filtered or unexported fields
}
CryptoDotComScraper is a scraper for Crypto.com
func NewCryptoDotComScraper ¶ added in v1.4.0
func NewCryptoDotComScraper(exchange dia.Exchange, scrape bool, relDB *models.RelDB) *CryptoDotComScraper
NewCryptoDotComScraper returns a new Crypto.com scraper
func (*CryptoDotComScraper) Channel ¶ added in v1.4.0
func (s *CryptoDotComScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*CryptoDotComScraper) Close ¶ added in v1.4.0
func (s *CryptoDotComScraper) Close() error
Close unsubscribes data and closes any existing WebSocket connections, as well as channels of CryptoDotComScraper
func (*CryptoDotComScraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *CryptoDotComScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns all traded pairs on Crypto.com
func (*CryptoDotComScraper) FillSymbolData ¶ added in v1.4.0
func (s *CryptoDotComScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData adds the name to the asset underlying @symbol on Crypto.com
func (*CryptoDotComScraper) NormalizePair ¶ added in v1.4.0
func (s *CryptoDotComScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*CryptoDotComScraper) ScrapePair ¶ added in v1.4.0
func (s *CryptoDotComScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from the Crypto.com scraper
type CurveFIPairScraper ¶
type CurveFIPairScraper struct {
// contains filtered or unexported fields
}
func (*CurveFIPairScraper) Close ¶
func (pairScraper *CurveFIPairScraper) Close() error
func (*CurveFIPairScraper) Error ¶
func (pairScraper *CurveFIPairScraper) Error() error
func (*CurveFIPairScraper) Pair ¶
func (pairScraper *CurveFIPairScraper) Pair() dia.ExchangePair
type CurveFIScraper ¶
type CurveFIScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
CurveFIScraper is a curve finance scraper on a specific blockchain.
func NewCurveFIScraper ¶
func NewCurveFIScraper(exchange dia.Exchange, scrape bool) *CurveFIScraper
func (*CurveFIScraper) Channel ¶
func (scraper *CurveFIScraper) Channel() chan *dia.Trade
func (*CurveFIScraper) Close ¶
func (scraper *CurveFIScraper) Close() error
func (*CurveFIScraper) FetchAvailablePairs ¶
func (scraper *CurveFIScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*CurveFIScraper) FillSymbolData ¶
func (scraper *CurveFIScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*CurveFIScraper) NormalizePair ¶
func (scraper *CurveFIScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*CurveFIScraper) ScrapePair ¶
func (scraper *CurveFIScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type DeribitScraper ¶
type DeribitScraper struct { Markets []string WaitGroup *sync.WaitGroup Logger *zap.SugaredLogger DataStore *models.DB WsConnection *websocket.Conn // required for deribit to: // 1. authenticate (trades is a private channel) // 2. referesh the token from step 1., so that the channel isn't closed AccessKey string AccessSecret string RefreshTokenEvery int16 // how often we refresh the token (in seconds) MarketKind DeribitScraperKind }
DeribitScraper - used in conjunction with the DeribitScraperKind in a new struct to define futures and options scrapers
func (*DeribitScraper) Scrape ¶
func (s *DeribitScraper) Scrape(market string)
Scrape starts a websocket scraper for market
func (*DeribitScraper) ScrapeMarkets ¶
func (s *DeribitScraper) ScrapeMarkets()
ScrapeMarkets - will scrape the markets specified during instantiation
func (*DeribitScraper) ScraperClose ¶
func (s *DeribitScraper) ScraperClose(market string, websocketConnection interface{}) error
ScraperClose - responsible for closing out the scraper for a market
type DeribitScraperKind ¶
type DeribitScraperKind int
DeribitScraperKind - used to distinguish between the futures and options scrapers
const ( // DeribitFuture - constant to signal the futures scraper DeribitFuture DeribitScraperKind = iota + 1 // DeribitOption - constant to signal the options scraper DeribitOption )
type DforcePairScraper ¶
type DforcePairScraper struct {
// contains filtered or unexported fields
}
func (*DforcePairScraper) Close ¶
func (pairScraper *DforcePairScraper) Close() error
func (*DforcePairScraper) Error ¶
func (pairScraper *DforcePairScraper) Error() error
func (*DforcePairScraper) Pair ¶
func (pairScraper *DforcePairScraper) Pair() dia.ExchangePair
type DforceScraper ¶
type DforceScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewDforceScraper ¶
func NewDforceScraper(exchange dia.Exchange, scrape bool) *DforceScraper
func (*DforceScraper) Channel ¶
func (scraper *DforceScraper) Channel() chan *dia.Trade
func (*DforceScraper) Close ¶
func (scraper *DforceScraper) Close() error
func (*DforceScraper) FetchAvailablePairs ¶
func (scraper *DforceScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*DforceScraper) FillSymbolData ¶
func (scraper *DforceScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*DforceScraper) NormalizePair ¶
func (scraper *DforceScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*DforceScraper) ScrapePair ¶
func (scraper *DforceScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type DforceToken ¶
type ECBPairScraper ¶
type ECBPairScraper struct {
// contains filtered or unexported fields
}
ECBPairScraper implements PairScraper for ECB
func (*ECBPairScraper) Close ¶
func (ps *ECBPairScraper) Close() error
func (*ECBPairScraper) Error ¶
func (ps *ECBPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*ECBPairScraper) Pair ¶
func (ps *ECBPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type ECBScraper ¶
type ECBScraper struct {
// contains filtered or unexported fields
}
func SpawnECBScraper ¶
func SpawnECBScraper(datastore models.Datastore) *ECBScraper
SpawnECBScraper returns a new ECBScraper initialized with default values. The instance is asynchronously scraping as soon as it is created.
func (*ECBScraper) Channel ¶
func (ps *ECBScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades/pricing information
func (*ECBScraper) Close ¶
func (s *ECBScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*ECBScraper) ScrapePair ¶
func (s *ECBScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
func (*ECBScraper) Update ¶
func (s *ECBScraper) Update() error
Update performs a HTTP Get request for the rss feed and decodes the results.
type FTXFuturesScraper ¶
type FTXFuturesScraper struct { Markets []string WaitGroup *sync.WaitGroup Writer writers.Writer Logger *zap.SugaredLogger }
FTXFuturesScraper - scrapes the futures from the FTX exchange
func (*FTXFuturesScraper) Authenticate ¶
func (s *FTXFuturesScraper) Authenticate(market string, connection interface{}) error
Authenticate - placeholder here, since we do not need to authneticate the connection.
func (*FTXFuturesScraper) Scrape ¶
func (s *FTXFuturesScraper) Scrape(market string)
Scrape starts a websocket scraper for market
func (*FTXFuturesScraper) ScrapeMarkets ¶
func (s *FTXFuturesScraper) ScrapeMarkets()
ScrapeMarkets - will scrape the markets specified during instantiation
func (*FTXFuturesScraper) ScraperClose ¶
func (s *FTXFuturesScraper) ScraperClose(market string, connection interface{}) error
ScraperClose - safely closes the scraper; We pass the interface connection as the second argument primarily for the reason that Huobi scraper does not use the gorilla websocket; It uses golang's x websocket; If we did not define this method in our FuturesScraper interface, we could have easily used the pointer to gorilla websocket here; However, to make FuturesScraper more ubiquituous, we need an interface here.
type FTXPairScraper ¶ added in v1.4.0
type FTXPairScraper struct {
// contains filtered or unexported fields
}
FTXPairScraper implements PairScraper for FTX
func (*FTXPairScraper) Close ¶ added in v1.4.0
func (p *FTXPairScraper) Close() error
Close stops listening for trades of the pair associated with the FTX scraper
func (*FTXPairScraper) Error ¶ added in v1.4.0
func (p *FTXPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*FTXPairScraper) Pair ¶ added in v1.4.0
func (p *FTXPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type FTXScraper ¶ added in v1.4.0
type FTXScraper struct {
// contains filtered or unexported fields
}
FTXScraper is a scraper for FTX
func NewFTXScraper ¶ added in v1.4.0
NewFTXScraper returns a new FTX scraper
func (*FTXScraper) Channel ¶ added in v1.4.0
func (s *FTXScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*FTXScraper) Close ¶ added in v1.4.0
func (s *FTXScraper) Close() error
Close unsubscribes data and closes any existing WebSocket connections, as well as channels of FTXPairScraper
func (*FTXScraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *FTXScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns all traded pairs on FTX
func (*FTXScraper) FillSymbolData ¶ added in v1.4.0
func (s *FTXScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData adds the name to the asset underlying @symbol on FTX
func (*FTXScraper) NormalizePair ¶ added in v1.4.0
func (s *FTXScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*FTXScraper) ScrapePair ¶ added in v1.4.0
func (s *FTXScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from the FTX scraper
type FinageForexPairScraper ¶
type FinageForexPairScraper struct {
// contains filtered or unexported fields
}
ECBPairScraper implements PairScraper for ECB
func (*FinageForexPairScraper) Close ¶
func (ps *FinageForexPairScraper) Close() error
func (*FinageForexPairScraper) Error ¶
func (ps *FinageForexPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*FinageForexPairScraper) Pair ¶
func (ps *FinageForexPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type FinageForexScraper ¶
type FinageForexScraper struct {
// contains filtered or unexported fields
}
func NewFinageForexScraper ¶
func NewFinageForexScraper(exchange dia.Exchange, scrape bool, relDB *models.RelDB, finageAPIkey string, finageWebsocketKey string) *FinageForexScraper
SpawnECBScraper returns a new ECBScraper initialized with default values. The instance is asynchronously scraping as soon as it is created.
func (*FinageForexScraper) Channel ¶
func (ps *FinageForexScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades/pricing information
func (*FinageForexScraper) Close ¶
func (s *FinageForexScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*FinageForexScraper) FetchAvailablePairs ¶
func (s *FinageForexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*FinageForexScraper) FillSymbolData ¶
func (s *FinageForexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
func (*FinageForexScraper) NormalizePair ¶
func (s *FinageForexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*FinageForexScraper) ScrapePair ¶
func (s *FinageForexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
func (*FinageForexScraper) Update ¶
func (s *FinageForexScraper) Update() error
Update performs a HTTP Get request for the rss feed and decodes the results.
type FinageSymbolResponse ¶
type FinageTrade ¶
type FinageWSMessage ¶
type FuturesScraper ¶
type FuturesScraper interface { Scrape(market string) // a self-sustained goroutine that scrapes a single market ScrapeMarkets() // will scrape the futures markets defined during instantiation of the scraper ScraperClose(market string, websocketConnection interface{}) error }
FuturesScraper is an interface for all of the Futures Contracts scrapers
func NewBitflyerFuturesScraper ¶
func NewBitflyerFuturesScraper(markets []string) FuturesScraper
NewBitflyerFuturesScraper - returns an instance of an options scraper.
func NewBitmexFuturesScraper ¶
func NewBitmexFuturesScraper(markets []string) FuturesScraper
NewBitmexFuturesScraper - returns an instance of an options scraper.
func NewCoinflexFuturesScraper ¶
func NewCoinflexFuturesScraper(markets []string) FuturesScraper
NewCoinflexFuturesScraper - returns an instance of the coinflex scraper
func NewDeribitFuturesScraper ¶
func NewDeribitFuturesScraper(markets []string, accessKey string, accessSecret string) FuturesScraper
NewDeribitFuturesScraper - creates a deribit futures scraper for you for the markets that you supply. Some of the markets available are: "BTC-PERPETUAL" and "ETH-PERPETUAL".
func NewFTXFuturesScraper ¶
func NewFTXFuturesScraper(markets []string) FuturesScraper
NewFTXFuturesScraper - returns an instance of the FTX scraper
func NewHuobiFuturesScraper ¶
func NewHuobiFuturesScraper(markets []string) FuturesScraper
NewHuobiFuturesScraper - returns an instance of the Huobi scraper
type GateIOCurrency ¶
type GateIOCurrency struct { No int `json:"no"` Symbol string `json:"symbol"` Name string `json:"name"` NameEn string `json:"name_en"` NameCn string `json:"name_cn"` Pair string `json:"pair"` Rate string `json:"rate"` VolA string `json:"vol_a"` VolB string `json:"vol_b"` CurrA string `json:"curr_a"` CurrB string `json:"curr_b"` CurrSuffix string `json:"curr_suffix"` RatePercent string `json:"rate_percent"` Trend string `json:"trend"` Lq string `json:"lq"` PRate int `json:"p_rate"` }
type GateIOPair ¶
type GateIOPair struct { ID string `json:"id"` Base string `json:"base"` Quote string `json:"quote"` Fee string `json:"fee"` MinQuoteAmount string `json:"min_quote_amount,omitempty"` AmountPrecision int `json:"amount_precision"` Precision int `json:"precision"` TradeStatus string `json:"trade_status"` SellStart int `json:"sell_start"` BuyStart int `json:"buy_start"` MinBaseAmount string `json:"min_base_amount,omitempty"` }
type GateIOPairScraper ¶
type GateIOPairScraper struct {
// contains filtered or unexported fields
}
GateIOPairScraper implements PairScraper for GateIO
func (*GateIOPairScraper) Close ¶
func (ps *GateIOPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*GateIOPairScraper) Error ¶
func (ps *GateIOPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*GateIOPairScraper) Pair ¶
func (ps *GateIOPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type GateIOResponseTrade ¶
type GateIOResponseTrade struct { Time int `json:"time"` Channel string `json:"channel"` Event string `json:"event"` Result struct { ID int `json:"id"` CreateTime int `json:"create_time"` CreateTimeMs string `json:"create_time_ms"` Side string `json:"side"` CurrencyPair string `json:"currency_pair"` Amount string `json:"amount"` Price string `json:"price"` } `json:"result"` }
type GateIOScraper ¶
type GateIOScraper struct {
// contains filtered or unexported fields
}
func NewGateIOScraper ¶
NewGateIOScraper returns a new GateIOScraper for the given pair
func (*GateIOScraper) Channel ¶
func (ps *GateIOScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*GateIOScraper) Close ¶
func (s *GateIOScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*GateIOScraper) FetchAvailablePairs ¶
func (s *GateIOScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*GateIOScraper) FillSymbolData ¶
func (s *GateIOScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FetchTickerData collects all available information on an asset traded on GateIO
func (*GateIOScraper) NormalizePair ¶
func (s *GateIOScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*GateIOScraper) ScrapePair ¶
func (s *GateIOScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type GateIOTickerData ¶
type GateIOTickerData struct { Result string `json:"result"` Data []GateIOCurrency `json:"data"` }
type GateIPPairResponse ¶
type GateIPPairResponse []GateIOPair
type HitBTCAsset ¶
type HitBTCAsset struct { ID string `json:"id"` FullName string `json:"fullName"` Crypto bool `json:"crypto"` PayinEnabled bool `json:"payinEnabled"` PayinPaymentID bool `json:"payinPaymentId"` PayinConfirmations int `json:"payinConfirmations"` PayoutEnabled bool `json:"payoutEnabled"` PayoutIsPaymentID bool `json:"payoutIsPaymentId"` TransferEnabled bool `json:"transferEnabled"` Delisted bool `json:"delisted"` PayoutFee string `json:"payoutFee"` PrecisionPayout int `json:"precisionPayout"` PrecisionTransfer int `json:"precisionTransfer"` }
type HitBTCPairScraper ¶
type HitBTCPairScraper struct {
// contains filtered or unexported fields
}
HitBTCPairScraper implements PairScraper for HitBTC
func (*HitBTCPairScraper) Close ¶
func (ps *HitBTCPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*HitBTCPairScraper) Error ¶
func (ps *HitBTCPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*HitBTCPairScraper) Pair ¶
func (ps *HitBTCPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type HitBTCScraper ¶
type HitBTCScraper struct {
// contains filtered or unexported fields
}
func NewHitBTCScraper ¶
NewHitBTCScraper returns a new HitBTCScraper for the given pair
func (*HitBTCScraper) Channel ¶
func (ps *HitBTCScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*HitBTCScraper) Close ¶
func (s *HitBTCScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*HitBTCScraper) FetchAvailablePairs ¶
func (s *HitBTCScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*HitBTCScraper) FillSymbolData ¶
func (ps *HitBTCScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FillSymbolData collects all available information on an asset traded on HitBTC
func (*HitBTCScraper) NormalizePair ¶
func (s *HitBTCScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*HitBTCScraper) ScrapePair ¶
func (s *HitBTCScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type HuobiCurrency ¶
type HuobiCurrency struct { Code int `json:"code"` Data []struct { Currency string `json:"currency"` AssetType int `json:"assetType"` Chains []struct { Chain string `json:"chain"` DisplayName string `json:"displayName"` BaseChain string `json:"baseChain"` BaseChainProtocol string `json:"baseChainProtocol"` IsDynamic bool `json:"isDynamic"` NumOfConfirmations int `json:"numOfConfirmations"` NumOfFastConfirmations int `json:"numOfFastConfirmations"` DepositStatus string `json:"depositStatus"` MinDepositAmt string `json:"minDepositAmt"` WithdrawStatus string `json:"withdrawStatus"` MinWithdrawAmt string `json:"minWithdrawAmt"` WithdrawPrecision int `json:"withdrawPrecision"` MaxWithdrawAmt string `json:"maxWithdrawAmt"` WithdrawQuotaPerDay string `json:"withdrawQuotaPerDay"` WithdrawQuotaPerYear interface{} `json:"withdrawQuotaPerYear"` WithdrawQuotaTotal interface{} `json:"withdrawQuotaTotal"` WithdrawFeeType string `json:"withdrawFeeType"` TransactFeeWithdraw string `json:"transactFeeWithdraw"` AddrWithTag bool `json:"addrWithTag"` AddrDepositTag bool `json:"addrDepositTag"` } `json:"chains"` InstStatus string `json:"instStatus"` } `json:"data"` }
type HuobiFuturesScraper ¶
type HuobiFuturesScraper struct { Markets []string // markets to scrape. To scrape all, call AllFuturesMarketsHuobi() WaitGroup *sync.WaitGroup Writer writers.Writer // an interface to write the messages Logger *zap.SugaredLogger }
HuobiFuturesScraper - scrapes huobi's futures markets
func (*HuobiFuturesScraper) Authenticate ¶
func (s *HuobiFuturesScraper) Authenticate(market string, connection interface{}) error
Authenticate - not required for Huobi to scrape the futures data.
func (*HuobiFuturesScraper) Scrape ¶
func (s *HuobiFuturesScraper) Scrape(market string)
Scrape starts a websocket scraper for market
func (*HuobiFuturesScraper) ScrapeMarkets ¶
func (s *HuobiFuturesScraper) ScrapeMarkets()
ScrapeMarkets - will scrape the markets specified during instantiation
func (*HuobiFuturesScraper) ScraperClose ¶
func (s *HuobiFuturesScraper) ScraperClose(market string, connection interface{}) error
ScraperClose - clean up after the scraper.
type HuobiPairScraper ¶
type HuobiPairScraper struct {
// contains filtered or unexported fields
}
HuobiPairScraper implements PairScraper for Huobi exchange
func (*HuobiPairScraper) Close ¶
func (ps *HuobiPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*HuobiPairScraper) Error ¶
func (ps *HuobiPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*HuobiPairScraper) Pair ¶
func (ps *HuobiPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type HuobiScraper ¶
type HuobiScraper struct {
// contains filtered or unexported fields
}
func NewHuobiScraper ¶
NewHuobiScraper returns a new HuobiScraper for the given pair
func (*HuobiScraper) Channel ¶
func (ps *HuobiScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*HuobiScraper) Close ¶
func (s *HuobiScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*HuobiScraper) FetchAvailablePairs ¶
func (s *HuobiScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*HuobiScraper) FillSymbolData ¶
func (s *HuobiScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData collects all available information on an asset traded on huobi
func (*HuobiScraper) NormalizePair ¶
func (s *HuobiScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*HuobiScraper) ScrapePair ¶
func (s *HuobiScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type InfluxPairScraper ¶
type InfluxPairScraper struct {
// contains filtered or unexported fields
}
GateIOPairScraper implements PairScraper for GateIO
func (*InfluxPairScraper) Close ¶
func (ps *InfluxPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*InfluxPairScraper) Error ¶
func (ps *InfluxPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*InfluxPairScraper) Pair ¶
func (ps *InfluxPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type InfluxScraper ¶
type InfluxScraper struct {
// contains filtered or unexported fields
}
func NewInfluxScraper ¶
func NewInfluxScraper(scrape bool) *InfluxScraper
NewGateIOScraper returns a new GateIOScraper for the given pair
func (*InfluxScraper) Channel ¶
func (s *InfluxScraper) Channel() chan *dia.Trade
func (*InfluxScraper) Close ¶
func (s *InfluxScraper) Close() error
func (*InfluxScraper) FetchAvailablePairs ¶
func (s *InfluxScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*InfluxScraper) FillSymbolData ¶
func (s *InfluxScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FetchTickerData collects all available information on an asset traded on GateIO
func (*InfluxScraper) NormalizePair ¶
func (s *InfluxScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*InfluxScraper) ScrapePair ¶
func (s *InfluxScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type KrakenPairScraper ¶
type KrakenPairScraper struct {
// contains filtered or unexported fields
}
KrakenPairScraper implements PairScraper for Kraken
func (*KrakenPairScraper) Close ¶
func (ps *KrakenPairScraper) Close() error
func (*KrakenPairScraper) Error ¶
func (ps *KrakenPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*KrakenPairScraper) Pair ¶
func (ps *KrakenPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type KrakenScraper ¶
type KrakenScraper struct {
// contains filtered or unexported fields
}
func NewKrakenScraper ¶
func NewKrakenScraper(key string, secret string, exchange dia.Exchange, scrape bool, relDB *models.RelDB) *KrakenScraper
NewKrakenScraper returns a new KrakenScraper initialized with default values. The instance is asynchronously scraping as soon as it is created.
func (*KrakenScraper) Channel ¶
func (ps *KrakenScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades/pricing information
func (*KrakenScraper) Close ¶
func (s *KrakenScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*KrakenScraper) FetchAvailablePairs ¶
func (s *KrakenScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*KrakenScraper) FillSymbolData ¶
func (s *KrakenScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*KrakenScraper) NormalizePair ¶
func (ps *KrakenScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
NormalizePair accounts for the par
func (*KrakenScraper) ScrapePair ¶
func (s *KrakenScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
func (*KrakenScraper) Update ¶
func (s *KrakenScraper) Update()
type KuCoinPairScraper ¶
type KuCoinPairScraper struct {
// contains filtered or unexported fields
}
KuCoinPairScraper implements PairScraper for kuCoin
func (*KuCoinPairScraper) Close ¶
func (ps *KuCoinPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*KuCoinPairScraper) Error ¶
func (ps *KuCoinPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*KuCoinPairScraper) Pair ¶
func (ps *KuCoinPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type KuCoinScraper ¶
type KuCoinScraper struct {
// contains filtered or unexported fields
}
func NewKuCoinScraper ¶
func (*KuCoinScraper) Channel ¶
func (ps *KuCoinScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*KuCoinScraper) Close ¶
func (s *KuCoinScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*KuCoinScraper) FetchAvailablePairs ¶
func (s *KuCoinScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns all traded pairs on kucoin.
func (*KuCoinScraper) FillSymbolData ¶
func (s *KuCoinScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FillSymbolData adds the name to the asset underlying @symbol on kucoin.
func (*KuCoinScraper) NormalizePair ¶
func (s *KuCoinScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*KuCoinScraper) ScrapePair ¶
func (s *KuCoinScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type KuExchangePair ¶
type KuExchangePair struct { Symbol string `json:"symbol"` Name string `json:"name"` BaseCurrency string `json:"baseCurrency"` QuoteCurrency string `json:"quoteCurrency"` FeeCurrency string `json:"feeCurrency"` Market string `json:"market"` BaseMinSize string `json:"baseMinSize"` QuoteMinSize string `json:"quoteMinSize"` BaseMaxSize string `json:"baseMaxSize"` QuoteMaxSize string `json:"quoteMaxSize"` BaseIncrement string `json:"baseIncrement"` QuoteIncrement string `json:"quoteIncrement"` PriceIncrement string `json:"priceIncrement"` PriceLimitRate string `json:"priceLimitRate"` IsMarginEnabled bool `json:"isMarginEnabled"` EnableTrading bool `json:"enableTrading"` }
type KuExchangePairs ¶
type KuExchangePairs []KuExchangePair
type KucoinCurrency ¶
type KucoinMarketMatch ¶
type KucoinMarketMatch struct { Symbol string `json:"symbol"` Sequence string `json:"sequence"` Side string `json:"side"` Size string `json:"size"` Price string `json:"price"` TakerOrderID string `json:"takerOrderId"` Time string `json:"time"` Type string `json:"type"` MakerOrderID string `json:"makerOrderId"` TradeID string `json:"tradeId"` }
type KyberPairScraper ¶
type KyberPairScraper struct {
// contains filtered or unexported fields
}
func (*KyberPairScraper) Close ¶
func (pairScraper *KyberPairScraper) Close() error
func (*KyberPairScraper) Error ¶
func (pairScraper *KyberPairScraper) Error() error
func (*KyberPairScraper) Pair ¶
func (pairScraper *KyberPairScraper) Pair() dia.ExchangePair
type KyberScraper ¶
type KyberScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewKyberScraper ¶
func NewKyberScraper(exchange dia.Exchange, scrape bool) *KyberScraper
func (*KyberScraper) Channel ¶
func (scraper *KyberScraper) Channel() chan *dia.Trade
func (*KyberScraper) Close ¶
func (scraper *KyberScraper) Close() error
func (*KyberScraper) FetchAvailablePairs ¶
func (scraper *KyberScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*KyberScraper) FillSymbolData ¶
func (scraper *KyberScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*KyberScraper) NormalizePair ¶
func (scraper *KyberScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*KyberScraper) ScrapePair ¶
func (scraper *KyberScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type KyberToken ¶
type LBankPairScraper ¶
type LBankPairScraper struct {
// contains filtered or unexported fields
}
LBankPairScraper implements PairScraper for LBank exchange
func (*LBankPairScraper) Close ¶
func (ps *LBankPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*LBankPairScraper) Error ¶
func (ps *LBankPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*LBankPairScraper) Pair ¶
func (ps *LBankPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type LBankScraper ¶
type LBankScraper struct {
// contains filtered or unexported fields
}
func NewLBankScraper ¶
NewLBankScraper returns a new LBankScraper for the given pair
func (*LBankScraper) Channel ¶
func (ps *LBankScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*LBankScraper) Close ¶
func (s *LBankScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*LBankScraper) FetchAvailablePairs ¶
func (s *LBankScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*LBankScraper) FillSymbolData ¶
func (s *LBankScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*LBankScraper) NormalizePair ¶
func (s *LBankScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*LBankScraper) ScrapePair ¶
func (s *LBankScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type LiquidChannel ¶
type LiquidChannel struct {
Channel string `json:"channel"`
}
type LiquidProduct ¶
type LiquidProduct struct { ID string `json:"id"` ProductType string `json:"product_type"` Code string `json:"code"` Name interface{} `json:"name"` MarketAsk float64 `json:"market_ask"` MarketBid float64 `json:"market_bid"` Indicator interface{} `json:"indicator"` Currency string `json:"currency"` CurrencyPairCode string `json:"currency_pair_code"` Symbol interface{} `json:"symbol"` BtcMinimumWithdraw interface{} `json:"btc_minimum_withdraw"` FiatMinimumWithdraw interface{} `json:"fiat_minimum_withdraw"` PusherChannel string `json:"pusher_channel"` TakerFee string `json:"taker_fee"` MakerFee string `json:"maker_fee"` LowMarketBid string `json:"low_market_bid"` HighMarketAsk string `json:"high_market_ask"` Volume24H string `json:"volume_24h"` LastPrice24H string `json:"last_price_24h"` LastTradedPrice string `json:"last_traded_price"` LastTradedQuantity string `json:"last_traded_quantity"` AveragePrice string `json:"average_price"` QuotedCurrency string `json:"quoted_currency"` BaseCurrency string `json:"base_currency"` TickSize string `json:"tick_size"` Disabled bool `json:"disabled"` MarginEnabled bool `json:"margin_enabled"` CfdEnabled bool `json:"cfd_enabled"` PerpetualEnabled bool `json:"perpetual_enabled"` LastEventTimestamp string `json:"last_event_timestamp"` Timestamp string `json:"timestamp"` MultiplierUp string `json:"multiplier_up"` MultiplierDown string `json:"multiplier_down"` AverageTimeInterval int `json:"average_time_interval"` ProgressiveTierEligible bool `json:"progressive_tier_eligible"` }
type LiquidProducts ¶
type LiquidProducts []LiquidProduct
type LiquidResponse ¶
type LiquidResponseTrade ¶
type LiquidSubscribe ¶
type LiquidSubscribe struct { Event string `json:"event"` Data LiquidChannel `json:"data"` }
type LoopringKey ¶
type LoopringKey struct {
Key string `json:"key"`
}
type LoopringMarket ¶
type LoopringMarket struct { Data []struct { Market string `json:"market"` BaseTokenID int `json:"baseTokenId"` QuoteTokenID int `json:"quoteTokenId"` PrecisionForPrice int `json:"precisionForPrice"` OrderbookAggLevels int `json:"orderbookAggLevels"` Enabled bool `json:"enabled"` } `json:"markets"` }
type LoopringPairScraper ¶
type LoopringPairScraper struct {
// contains filtered or unexported fields
}
LoopringPairScraper implements PairScraper for Loopring exchange
func (*LoopringPairScraper) Close ¶
func (ps *LoopringPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*LoopringPairScraper) Error ¶
func (ps *LoopringPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*LoopringPairScraper) Pair ¶
func (ps *LoopringPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type LoopringScraper ¶
type LoopringScraper struct {
// contains filtered or unexported fields
}
func NewLoopringScraper ¶
NewLoopringScraper returns a new LoopringScraper for the given pair
func (*LoopringScraper) Channel ¶
func (ps *LoopringScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*LoopringScraper) Close ¶
func (s *LoopringScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*LoopringScraper) FetchAvailablePairs ¶
func (s *LoopringScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*LoopringScraper) FillSymbolData ¶
func (s *LoopringScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*LoopringScraper) NormalizePair ¶
func (s *LoopringScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*LoopringScraper) Pong ¶
func (s *LoopringScraper) Pong(messageType int) error
Pong sends the string "pong" to the server.
func (*LoopringScraper) ScrapePair ¶
func (s *LoopringScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type LoopringTopic ¶
type MEXCExchangeInfo ¶ added in v1.4.2
type MEXCExchangeInfo struct { Timezone string `json:"timezone"` ServerTime int `json:"serverTime"` RateLimits string `json:"rateLimits"` ExchangeFilters string `json:"exchangeFilters"` Symbols []MEXCExchangeSymbol `json:"symbols"` }
type MEXCExchangeSymbol ¶ added in v1.4.2
type MEXCExchangeSymbol struct { Symbol string `json:"symbol"` Status string `json:"status"` BaseAsset string `json:"baseAsset"` BaseAssetPrecision int `json:"baseAssetPrecision"` QuoteAsset string `json:"quoteAsset"` QuotePrecision int `json:"quotePrecision"` QuoteAssetPrecision int `json:"quoteAssetPrecision"` BaseCommissionPrecision int `json:"baseCommissionPrecision"` QuoteCommissionPrecision int `json:"quoteCommissionPrecision"` OrderTypes []string `json:"orderTypes"` // [LIMIT, LIMIT_MAKER] QuoteOrderQtyMarketAllowed bool `json:"quoteOrderQtyMarketAllowed"` IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` QuoteAmountPrecision string `json:"quoteAmountPrecision"` BaseSizePrecision string `json:"baseSizePrecision"` Permissions []string `json:"permissions"` Filters []string `json:"filters"` MaxQuoteAmount string `json:"maxQuoteAmount"` MakerCommission string `json:"makerCommission"` TakerCommission string `json:"takerCommission"` }
type MEXCPairScraper ¶ added in v1.4.2
type MEXCPairScraper struct {
// contains filtered or unexported fields
}
MEXCPairScraper implements PairScraper for MEXC
func (*MEXCPairScraper) Close ¶ added in v1.4.2
func (ps *MEXCPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*MEXCPairScraper) Error ¶ added in v1.4.2
func (ps *MEXCPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*MEXCPairScraper) Pair ¶ added in v1.4.2
func (ps *MEXCPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type MEXCRequest ¶ added in v1.4.2
type MEXCScraper ¶ added in v1.4.2
type MEXCScraper struct {
// contains filtered or unexported fields
}
MEXCScraper is a scraper for MEXC
func NewMEXCScraper ¶ added in v1.4.2
func (*MEXCScraper) Channel ¶ added in v1.4.2
func (s *MEXCScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*MEXCScraper) Close ¶ added in v1.4.2
func (s *MEXCScraper) Close() error
func (*MEXCScraper) FetchAvailablePairs ¶ added in v1.4.2
func (s *MEXCScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*MEXCScraper) FillSymbolData ¶ added in v1.4.2
func (s *MEXCScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
FillSymbolData from MEXCScraper @todo more update
func (*MEXCScraper) NormalizePair ¶ added in v1.4.2
func (s *MEXCScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*MEXCScraper) ScrapePair ¶ added in v1.4.2
func (s *MEXCScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type MEXCTradeResponse ¶ added in v1.4.2
type MakerPairResponse ¶
type MakerPairScraper ¶
type MakerPairScraper struct {
// contains filtered or unexported fields
}
func (*MakerPairScraper) Close ¶
func (pairScraper *MakerPairScraper) Close() error
func (*MakerPairScraper) Error ¶
func (pairScraper *MakerPairScraper) Error() error
func (*MakerPairScraper) Pair ¶
func (pairScraper *MakerPairScraper) Pair() dia.ExchangePair
type MakerScraper ¶
type MakerScraper struct {
// contains filtered or unexported fields
}
func NewMakerScraper ¶
func (*MakerScraper) Channel ¶
func (scraper *MakerScraper) Channel() chan *dia.Trade
func (*MakerScraper) Close ¶
func (scraper *MakerScraper) Close() error
func (*MakerScraper) FetchAvailablePairs ¶
func (scraper *MakerScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*MakerScraper) FillSymbolData ¶
func (scraper *MakerScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData is not used by DEX scrapers.
func (*MakerScraper) GetNewTrades ¶
func (scraper *MakerScraper) GetNewTrades(pair string, startTradeID string) ([]MakerTrade, error)
func (*MakerScraper) NormalizePair ¶
func (scraper *MakerScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*MakerScraper) ScrapePair ¶
func (scraper *MakerScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type MakerTrade ¶
type MakerTradeResponse ¶
type MakerTradeResponse struct { MakerTrades []MakerTrade `json:"data"` Time time.Time `json:"time"` Message string `json:"message"` }
type Message ¶
type Message struct {
Transactions []BitBayTransaction `json:"transactions"`
}
type MultiChainConfig ¶ added in v1.4.2
type MultiChainConfig struct {
// contains filtered or unexported fields
}
type OKEXMarket ¶
type OKEXMarket struct { Alias string `json:"alias"` BaseCcy string `json:"baseCcy"` Category string `json:"category"` CtMult string `json:"ctMult"` CtType string `json:"ctType"` CtVal string `json:"ctVal"` CtValCcy string `json:"ctValCcy"` ExpTime string `json:"expTime"` InstID string `json:"instId"` InstType string `json:"instType"` Lever string `json:"lever"` ListTime string `json:"listTime"` LotSz string `json:"lotSz"` MinSz string `json:"minSz"` OptType string `json:"optType"` QuoteCcy string `json:"quoteCcy"` SettleCcy string `json:"settleCcy"` State string `json:"state"` Stk string `json:"stk"` TickSz string `json:"tickSz"` Uly string `json:"uly"` }
type OKEXWSResponse ¶
type OKEXWSResponse struct { Arg struct { Channel string `json:"channel"` InstID string `json:"instId"` } `json:"arg"` Data []struct { InstID string `json:"instId"` TradeID string `json:"tradeId"` Px string `json:"px"` Sz string `json:"sz"` Side string `json:"side"` Ts string `json:"ts"` } `json:"data"` }
type OKExPairScraper ¶
type OKExPairScraper struct {
// contains filtered or unexported fields
}
OKExPairScraper implements PairScraper for OKEx exchange
func (*OKExPairScraper) Close ¶
func (ps *OKExPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*OKExPairScraper) Error ¶
func (ps *OKExPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*OKExPairScraper) Pair ¶
func (ps *OKExPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type OKExScraper ¶
type OKExScraper struct {
// contains filtered or unexported fields
}
func NewOKExScraper ¶
NewOKExScraper returns a new OKExScraper for the given pair
func (*OKExScraper) Channel ¶
func (s *OKExScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*OKExScraper) Close ¶
func (s *OKExScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*OKExScraper) FetchAvailablePairs ¶
func (s *OKExScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*OKExScraper) FillSymbolData ¶
func (s *OKExScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
func (*OKExScraper) NormalizePair ¶
func (s *OKExScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*OKExScraper) ScrapePair ¶
func (s *OKExScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type OptionSettlement ¶
type OptionSettlement int
OptionSettlement - is an enum, signalling if the settlement is regular or weekly
const ( RegularOptionSettlement OptionSettlement = iota + 1 WeeklyOptionSettlement )
OptionSettlement enums
type OptionsScraper ¶
type OptionsScraper interface { Scrape(market string) // a self-sustained goroutine that scrapes a single market // ScrapeMarkets() // will scrape the options markets defined during instantiation of the scraper ScraperClose(market string, websocketConnection interface{}) error Authenticate(market string, websocketConnection interface{}) error }
OptionsScraper is an interface for all of the Options Contracts scrapers
type PairScraper ¶
type PairScraper interface { io.Closer // Error returns an error when the channel Channel() is closed // and nil otherwise Error() error // Pair returns the pair this scraper is subscribed to Pair() dia.ExchangePair }
PairScraper receives trades for a single pc.ExchangePair from a single exchange.
type ParsedDeribitResponse ¶
type ParsedDeribitResponse struct { Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` Params ParsedDeribitResponseParams `json:"params"` }
type ParsedDeribitResponseParams ¶
type ParsedDeribitResponseParams struct { Channel string `json:"channel"` Data ParsedDeribitOptionOrderbookEntry `json:"data"` }
type PongMessage ¶ added in v1.4.0
type QuoinePairScraper ¶
type QuoinePairScraper struct {
// contains filtered or unexported fields
}
func (*QuoinePairScraper) Close ¶
func (pairScraper *QuoinePairScraper) Close() error
func (*QuoinePairScraper) Error ¶
func (pairScraper *QuoinePairScraper) Error() error
func (*QuoinePairScraper) Pair ¶
func (pairScraper *QuoinePairScraper) Pair() dia.ExchangePair
type QuoineScraper ¶
type QuoineScraper struct {
// contains filtered or unexported fields
}
func NewQuoineScraper ¶
func (*QuoineScraper) Channel ¶
func (pairScraper *QuoineScraper) Channel() chan *dia.Trade
func (*QuoineScraper) Close ¶
func (scraper *QuoineScraper) Close() error
func (*QuoineScraper) FetchAvailablePairs ¶
func (scraper *QuoineScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*QuoineScraper) FillSymbolData ¶
func (scraper *QuoineScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*QuoineScraper) NormalizePair ¶
func (s *QuoineScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*QuoineScraper) ScrapePair ¶
func (scraper *QuoineScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type ResponseGate ¶
type ResponseGate struct { Method string `json:"method,omitempty"` Params []interface{} `json:"params,omitempty"` Id interface{} `json:"id,omitempty"` }
type ResponseLBank ¶
type ResponseType ¶
type STEXPairScraper ¶
type STEXPairScraper struct {
// contains filtered or unexported fields
}
STEXPairScraper implements PairScraper for STEX
func (*STEXPairScraper) Close ¶
func (ps *STEXPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*STEXPairScraper) Error ¶
func (ps *STEXPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*STEXPairScraper) Pair ¶
func (ps *STEXPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type STEXScraper ¶
type STEXScraper struct {
// contains filtered or unexported fields
}
func NewSTEXScraper ¶
NewSTEXScraper returns a new STEXScraper for the given pair
func (*STEXScraper) Channel ¶
func (ps *STEXScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*STEXScraper) Close ¶
func (s *STEXScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*STEXScraper) FetchAvailablePairs ¶
func (s *STEXScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*STEXScraper) FillSymbolData ¶
func (s *STEXScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData collects all available information on an asset traded on STEX
func (*STEXScraper) GetNewTrades ¶
GetNewTrades fetches new trades from the STEX restAPI dating back until @fromTimestamp
func (*STEXScraper) NormalizePair ¶
func (s *STEXScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*STEXScraper) ScrapePair ¶
func (s *STEXScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type STEXTickerData ¶
type SerumEvent ¶ added in v1.4.0
type SerumEventQueueHeader ¶ added in v1.4.0
type SerumPairScraper ¶ added in v1.4.0
type SerumPairScraper struct {
// contains filtered or unexported fields
}
SerumPairScraper implements PairScraper for Serum
func (*SerumPairScraper) Channel ¶ added in v1.4.0
func (sps *SerumPairScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*SerumPairScraper) Close ¶ added in v1.4.0
func (sps *SerumPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*SerumPairScraper) Error ¶ added in v1.4.0
func (sps *SerumPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*SerumPairScraper) Pair ¶ added in v1.4.0
func (sps *SerumPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type SerumScraper ¶ added in v1.4.0
type SerumScraper struct {
// contains filtered or unexported fields
}
func NewSerumScraper ¶ added in v1.4.0
func NewSerumScraper(exchange dia.Exchange, scrape bool) *SerumScraper
func (*SerumScraper) Channel ¶ added in v1.4.0
func (s *SerumScraper) Channel() chan *dia.Trade
func (*SerumScraper) Close ¶ added in v1.4.0
func (s *SerumScraper) Close() error
func (*SerumScraper) FetchAvailablePairs ¶ added in v1.4.0
func (s *SerumScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*SerumScraper) FillSymbolData ¶ added in v1.4.0
func (s *SerumScraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*SerumScraper) NormalizePair ¶ added in v1.4.0
func (s *SerumScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*SerumScraper) ScrapePair ¶ added in v1.4.0
func (s *SerumScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type SimexAsset ¶
type SimexPairScraper ¶
type SimexPairScraper struct {
// contains filtered or unexported fields
}
SimexPairScraper implements PairScraper for Simex
func (*SimexPairScraper) Close ¶
func (ps *SimexPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*SimexPairScraper) Error ¶
func (ps *SimexPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*SimexPairScraper) Pair ¶
func (ps *SimexPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type SimexScraper ¶
type SimexScraper struct {
// contains filtered or unexported fields
}
func NewSimexScraper ¶
func (*SimexScraper) Channel ¶
func (ps *SimexScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*SimexScraper) Close ¶
func (s *SimexScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*SimexScraper) FetchAvailablePairs ¶
func (s *SimexScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*SimexScraper) FillSymbolData ¶
func (s *SimexScraper) FillSymbolData(symbol string) (asset dia.Asset, err error)
func (*SimexScraper) NormalizePair ¶
func (s *SimexScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*SimexScraper) ScrapePair ¶
func (s *SimexScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type SimexTicker ¶
type SimexTicker struct {
Data []SimexAsset `json:"data"`
}
type StexTradeResponse ¶
type SubscribeGate ¶
type SubscribeLBank ¶
type SubscribePing ¶ added in v1.4.0
type SubscribePing struct {
Action string `json:"action"`
}
type Trade ¶
type Trade struct { Amount string `json:"amount"` Amount2 float64 `json:"amount2"` BuyOrderID int64 `json:"buy_order_id"` CurrencyPairID int64 `json:"currency_pair_id"` Date string `json:"date"` ID int64 `json:"id"` OrderType string `json:"order_type"` Price string `json:"price"` SellOrderID int64 `json:"sell_order_id"` Socket interface{} `json:"socket"` Timestamp int64 `json:"timestamp"` }
type UniswapHistoryPairScraper ¶
type UniswapHistoryPairScraper struct {
// contains filtered or unexported fields
}
UniswapPairScraper implements PairScraper for Uniswap
func (*UniswapHistoryPairScraper) Close ¶
func (ps *UniswapHistoryPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*UniswapHistoryPairScraper) Error ¶
func (ps *UniswapHistoryPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*UniswapHistoryPairScraper) Pair ¶
func (ps *UniswapHistoryPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type UniswapHistoryScraper ¶
type UniswapHistoryScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewUniswapHistoryScraper ¶
func NewUniswapHistoryScraper(exchange dia.Exchange, scrape bool, relDB *models.RelDB) *UniswapHistoryScraper
NewUniswapScraper returns a new UniswapScraper for the given pair
func (*UniswapHistoryScraper) Channel ¶
func (ps *UniswapHistoryScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*UniswapHistoryScraper) Close ¶
func (s *UniswapHistoryScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*UniswapHistoryScraper) FetchAvailablePairs ¶
func (s *UniswapHistoryScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs as dia.ExchangePair for the pairDiscorvery service
func (*UniswapHistoryScraper) FillSymbolData ¶
func (s *UniswapHistoryScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData is not used by DEX scrapers.
func (*UniswapHistoryScraper) GetAllPairs ¶
func (s *UniswapHistoryScraper) GetAllPairs() ([]UniswapPair, error)
GetAllPairs is similar to FetchAvailablePairs. But instead of dia.ExchangePairs it returns all pairs as UniswapPairs, i.e. including the pair's address
func (*UniswapHistoryScraper) GetDecimals ¶
func (s *UniswapHistoryScraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
GetDecimals returns the decimals of the token with address @tokenAddress
func (*UniswapHistoryScraper) GetName ¶
func (s *UniswapHistoryScraper) GetName(tokenAddress common.Address) (name string, err error)
func (*UniswapHistoryScraper) GetPairByAddress ¶
func (s *UniswapHistoryScraper) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
GetPairByAddress returns the UniswapPair with pair address @pairAddress
func (*UniswapHistoryScraper) GetPairByID ¶
func (s *UniswapHistoryScraper) GetPairByID(num int64) (UniswapPair, error)
GetPairByID returns the UniswapPair with the integer id @num
func (*UniswapHistoryScraper) NormalizePair ¶
func (up *UniswapHistoryScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*UniswapHistoryScraper) ScrapePair ¶
func (s *UniswapHistoryScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type UniswapPair ¶
type UniswapPair struct { Token0 UniswapToken Token1 UniswapToken ForeignName string Address common.Address }
type UniswapPairScraper ¶
type UniswapPairScraper struct {
// contains filtered or unexported fields
}
UniswapPairScraper implements PairScraper for Uniswap
func (*UniswapPairScraper) Close ¶
func (ps *UniswapPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*UniswapPairScraper) Error ¶
func (ps *UniswapPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*UniswapPairScraper) Pair ¶
func (ps *UniswapPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type UniswapPairV3Scraper ¶
type UniswapPairV3Scraper struct {
// contains filtered or unexported fields
}
UniswapPairScraper implements PairScraper for Uniswap
func (*UniswapPairV3Scraper) Close ¶
func (ps *UniswapPairV3Scraper) Close() error
Close stops listening for trades of the pair associated with s
func (*UniswapPairV3Scraper) Error ¶
func (ps *UniswapPairV3Scraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*UniswapPairV3Scraper) Pair ¶
func (ps *UniswapPairV3Scraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type UniswapScraper ¶
type UniswapScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewUniswapScraper ¶
func NewUniswapScraper(exchange dia.Exchange, scrape bool) *UniswapScraper
NewUniswapScraper returns a new UniswapScraper for the given pair
func (*UniswapScraper) Channel ¶
func (ps *UniswapScraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*UniswapScraper) Close ¶
func (s *UniswapScraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*UniswapScraper) FetchAvailablePairs ¶
func (s *UniswapScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs as dia.ExchangePair for the pairDiscorvery service
func (*UniswapScraper) FillSymbolData ¶
func (s *UniswapScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData is not used by DEX scrapers.
func (*UniswapScraper) GetAllPairs ¶
func (s *UniswapScraper) GetAllPairs() ([]UniswapPair, error)
GetAllPairs is similar to FetchAvailablePairs. But instead of dia.ExchangePairs it returns all pairs as UniswapPairs, i.e. including the pair's address
func (*UniswapScraper) GetDecimals ¶
func (s *UniswapScraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
GetDecimals returns the decimals of the token with address @tokenAddress
func (*UniswapScraper) GetName ¶
func (s *UniswapScraper) GetName(tokenAddress common.Address) (name string, err error)
func (*UniswapScraper) GetPairByAddress ¶
func (s *UniswapScraper) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
GetPairByAddress returns the UniswapPair with pair address @pairAddress
func (*UniswapScraper) GetPairByID ¶
func (s *UniswapScraper) GetPairByID(num int64) (UniswapPair, error)
GetPairByID returns the UniswapPair with the integer id @num
func (*UniswapScraper) GetSwapsChannel ¶
func (s *UniswapScraper) GetSwapsChannel(pairAddress common.Address) (chan *uniswap.UniswapV2PairSwap, error)
GetSwapsChannel returns a channel for swaps of the pair with address @pairAddress
func (*UniswapScraper) ListenToPair ¶ added in v1.3.4
func (s *UniswapScraper) ListenToPair(i int, address common.Address, byAddress bool)
ListenToPair subscribes to a uniswap pool. If @byAddress is true, it listens by pool address, otherwise by index.
func (*UniswapScraper) NormalizePair ¶
func (up *UniswapScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*UniswapScraper) ScrapePair ¶
func (s *UniswapScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type UniswapSwap ¶
type UniswapToken ¶
type UniswapV3Scraper ¶
type UniswapV3Scraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewUniswapV3Scraper ¶
func NewUniswapV3Scraper(exchange dia.Exchange, scrape bool) *UniswapV3Scraper
NewUniswapV3Scraper returns a new UniswapV3Scraper
func (*UniswapV3Scraper) Channel ¶
func (s *UniswapV3Scraper) Channel() chan *dia.Trade
Channel returns a channel that can be used to receive trades
func (*UniswapV3Scraper) Close ¶
func (s *UniswapV3Scraper) Close() error
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*UniswapV3Scraper) FetchAvailablePairs ¶
func (s *UniswapV3Scraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs as dia.Pair for the pairDiscorvery service
func (*UniswapV3Scraper) FillSymbolData ¶
func (s *UniswapV3Scraper) FillSymbolData(symbol string) (dia.Asset, error)
func (*UniswapV3Scraper) GetDecimals ¶
func (s *UniswapV3Scraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
GetDecimals returns the decimals of the token with address @tokenAddress
func (*UniswapV3Scraper) GetPairByAddress ¶
func (s *UniswapV3Scraper) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
GetPairByAddress returns the UniswapPair with pair address @pairAddress
func (*UniswapV3Scraper) GetPairByTokenAddress ¶
func (s *UniswapV3Scraper) GetPairByTokenAddress(address0 common.Address, address1 common.Address, pairAddress common.Address) (pair UniswapPair, err error)
func (*UniswapV3Scraper) GetPairData ¶
func (s *UniswapV3Scraper) GetPairData(poolEvent *uniswapcontractv3.UniswapV3PoolCreated) (UniswapPair, error)
GetPairByID returns the UniswapPair with the integer id @num
func (*UniswapV3Scraper) GetSwapsChannel ¶
func (s *UniswapV3Scraper) GetSwapsChannel(pairAddress common.Address) (chan *UniswapV3Pair.UniswapV3PairSwap, error)
GetSwapsChannel returns a channel for swaps of the pair with address @pairAddress
func (*UniswapV3Scraper) NormalizePair ¶
func (s *UniswapV3Scraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*UniswapV3Scraper) ScrapePair ¶
func (s *UniswapV3Scraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type UniswapV3Swap ¶
type UniswapV3Swap struct { ID string Timestamp int64 Pair UniswapPair Amount0 float64 Amount1 float64 }
type WebSocketRequest ¶
type WebSocketRequest struct { Op string `json:"op"` Sequence int `json:"sequence"` Topics []LoopringTopic `json:"topics"` Result struct { Status string `json:"status"` } `json:"result"` }
type WebSocketResponse ¶
type XMLCubeTime ¶
type XMLEnvelope ¶
type XMLEnvelope struct { XMLName xml.Name `xml:"Envelope"` CubeTime []XMLCubeTime `xml:"Cube>Cube"` }
type XMLHistoricalEnvelope ¶
type XMLObs ¶
type XMLObs struct { XMLName xml.Name `xml:"Obs"` Timestamp XMLObsDimension `xml:"ObsDimension"` Price XMLObsValue `xml:"ObsValue"` }
type XMLObsDimension ¶
type XMLObsValue ¶
type ZBPairScraper ¶
type ZBPairScraper struct {
// contains filtered or unexported fields
}
ZBPairScraper implements PairScraper for ZB
func (*ZBPairScraper) Close ¶
func (ps *ZBPairScraper) Close() error
Close stops listening for trades of the pair associated with s
func (*ZBPairScraper) Error ¶
func (ps *ZBPairScraper) Error() error
Error returns an error when the channel Channel() is closed and nil otherwise
func (*ZBPairScraper) Pair ¶
func (ps *ZBPairScraper) Pair() dia.ExchangePair
Pair returns the pair this scraper is subscribed to
type ZBScraper ¶
type ZBScraper struct {
// contains filtered or unexported fields
}
func NewZBScraper ¶
NewZBScraper returns a new ZBScraper for the given pair
func (*ZBScraper) Close ¶
Close closes any existing API connections, as well as channels of PairScrapers from calls to ScrapePair
func (*ZBScraper) FetchAvailablePairs ¶
func (s *ZBScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
FetchAvailablePairs returns a list with all available trade pairs
func (*ZBScraper) FillSymbolData ¶
FillSymbolData is not used by DEX scrapers.
func (*ZBScraper) NormalizePair ¶
func (s *ZBScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*ZBScraper) ScrapePair ¶
func (s *ZBScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
ScrapePair returns a PairScraper that can be used to get trades for a single pair from this APIScraper
type ZBSubscribe ¶
type ZBTradeResponse ¶
type ZeroxPairScraper ¶
type ZeroxPairScraper struct {
// contains filtered or unexported fields
}
func (*ZeroxPairScraper) Close ¶
func (pairScraper *ZeroxPairScraper) Close() error
func (*ZeroxPairScraper) Error ¶
func (pairScraper *ZeroxPairScraper) Error() error
func (*ZeroxPairScraper) Pair ¶
func (pairScraper *ZeroxPairScraper) Pair() dia.ExchangePair
type ZeroxScraper ¶
type ZeroxScraper struct { WsClient *ethclient.Client RestClient *ethclient.Client // contains filtered or unexported fields }
func NewZeroxScraper ¶
func NewZeroxScraper(exchange dia.Exchange, scrape bool) *ZeroxScraper
func (*ZeroxScraper) Channel ¶
func (scraper *ZeroxScraper) Channel() chan *dia.Trade
func (*ZeroxScraper) Close ¶
func (scraper *ZeroxScraper) Close() error
func (*ZeroxScraper) FetchAvailablePairs ¶
func (scraper *ZeroxScraper) FetchAvailablePairs() (pairs []dia.ExchangePair, err error)
func (*ZeroxScraper) FetchTickerData ¶
func (scraper *ZeroxScraper) FetchTickerData(symbol string) (dia.Asset, error)
func (*ZeroxScraper) FillSymbolData ¶
func (scraper *ZeroxScraper) FillSymbolData(symbol string) (dia.Asset, error)
FillSymbolData is not used by DEX scrapers.
func (*ZeroxScraper) NormalizePair ¶
func (s *ZeroxScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error)
func (*ZeroxScraper) ScrapePair ¶
func (scraper *ZeroxScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error)
type ZeroxToken ¶
Source Files ¶
- APIDerivativesScraper.go
- APIFuturesScraper.go
- APIOptionsScraper.go
- APIScraper.go
- AnyswapEthScraper.go
- BalancerScraper.go
- BalancerV2Scraper.go
- BancorScraper.go
- BinanceScraper.go
- BinanceScraperUS.go
- BitBayScraper.go
- BitMexScraper.go
- BitfinexScraper.go
- Bitforex.go
- BitmaxScraper.go
- BittrexScraper.go
- ByBitScraper.go
- CREX24Scraper.go
- CoinBaseScraper.go
- CryptoDotComScraper.go
- CurvefiScraper.go
- DforceScraper.go
- ECBScraper.go
- FTXScraper.go
- FinageForexScraper.go
- FuturesBitflyerScraper.go
- FuturesBitmexScraper.go
- FuturesCoinflexScraper.go
- FuturesDeribitScraper.go
- FuturesFTXScraper.go
- FuturesHuobiScraper.go
- GateIOScraper.go
- HitBTCScraper.go
- HuobiScraper.go
- InfluxScraper.go
- KrakenScraper.go
- KuCoinScraper.go
- KyberScraper.go
- LBankScraper.go
- LoopringScraper.go
- MEXCScraper.go
- MakerScraper.go
- MultichainScraper.go
- OKExScraper.go
- QuoineScraper.go
- STEXScraper.go
- SerumScraper.go
- SimexScraper.go
- UniswapV2Scraper.go
- UniswapV2ScraperHistory.go
- UniswapV3Scraper.go
- ZBScraper.go
- ZeroxScraper.go
- init.go