Documentation
¶
Index ¶
- type BalancerV2Scraper
- type BancorPool
- type BancorPoolScraper
- func (scraper *BancorPoolScraper) ConverterTypeFour(address common.Address) (tokenAddress []common.Address, poolBalances []*big.Int, err error)
- func (scraper *BancorPoolScraper) ConverterTypeOne(address common.Address) (tokenAddress []common.Address, poolBalances []*big.Int, err error)
- func (scraper *BancorPoolScraper) ConverterTypeThree(address common.Address) (tokenAddress []common.Address, poolBalances []*big.Int, err error)
- func (scraper *BancorPoolScraper) ConverterTypeZero(address common.Address) (tokenAddress []common.Address, poolBalances []*big.Int, err error)
- func (scraper *BancorPoolScraper) Done() chan bool
- func (scraper *BancorPoolScraper) Pool() chan dia.Pool
- type BancorPools
- type CurveFIScraper
- type LiquidityScraper
- type PlatypusCoin
- type PlatypusScraper
- type UniswapPair
- type UniswapScraper
- func (us *UniswapScraper) Done() chan bool
- func (us *UniswapScraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
- func (us *UniswapScraper) GetName(tokenAddress common.Address) (name string, err error)
- func (us *UniswapScraper) GetPoolByAddress(pairAddress common.Address) (pool dia.Pool, err error)
- func (us *UniswapScraper) GetPoolByID(num int64) (dia.Pool, error)
- func (us *UniswapScraper) Pool() chan dia.Pool
- type UniswapV3Scraper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalancerV2Scraper ¶
type BalancerV2Scraper struct {
RestClient *ethclient.Client
// contains filtered or unexported fields
}
func NewBalancerV2Scraper ¶
func NewBalancerV2Scraper(exchange dia.Exchange) *BalancerV2Scraper
NewBalancerV2Scraper returns a Balancer V2 scraper
func (*BalancerV2Scraper) Done ¶
func (scraper *BalancerV2Scraper) Done() chan bool
func (*BalancerV2Scraper) Pool ¶
func (scraper *BalancerV2Scraper) Pool() chan dia.Pool
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 BancorPoolScraper ¶
type BancorPoolScraper struct {
RestClient *ethclient.Client
// contains filtered or unexported fields
}
func NewBancorPoolScraper ¶
func NewBancorPoolScraper(exchange dia.Exchange) *BancorPoolScraper
func (*BancorPoolScraper) ConverterTypeFour ¶
func (*BancorPoolScraper) ConverterTypeOne ¶
func (*BancorPoolScraper) ConverterTypeThree ¶
func (*BancorPoolScraper) ConverterTypeZero ¶
func (*BancorPoolScraper) Done ¶
func (scraper *BancorPoolScraper) Done() chan bool
func (*BancorPoolScraper) Pool ¶
func (scraper *BancorPoolScraper) Pool() chan dia.Pool
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 CurveFIScraper ¶
type CurveFIScraper struct {
RestClient *ethclient.Client
// contains filtered or unexported fields
}
func NewCurveFIScraper ¶
func NewCurveFIScraper(exchange dia.Exchange) *CurveFIScraper
func (*CurveFIScraper) Done ¶
func (scraper *CurveFIScraper) Done() chan bool
func (*CurveFIScraper) Pool ¶
func (scraper *CurveFIScraper) Pool() chan dia.Pool
type LiquidityScraper ¶
func NewLiquidityScraper ¶
func NewLiquidityScraper(source string) LiquidityScraper
NewLiquidityScraper returns a liquidity scraper for @source.
type PlatypusCoin ¶
type PlatypusScraper ¶
type PlatypusScraper struct {
RestClient *ethclient.Client
// contains filtered or unexported fields
}
The scraper object for Platypus Finance
func NewPlatypusScraper ¶
func NewPlatypusScraper(exchange dia.Exchange) *PlatypusScraper
Returns a new exchange scraper
func (*PlatypusScraper) Done ¶
func (scraper *PlatypusScraper) Done() chan bool
func (*PlatypusScraper) Pool ¶
func (scraper *PlatypusScraper) Pool() chan dia.Pool
type UniswapPair ¶
type UniswapScraper ¶
type UniswapScraper struct {
RestClient *ethclient.Client
// contains filtered or unexported fields
}
func NewUniswapScraper ¶
func NewUniswapScraper(exchange dia.Exchange) (us *UniswapScraper)
func (*UniswapScraper) Done ¶
func (us *UniswapScraper) Done() chan bool
func (*UniswapScraper) GetDecimals ¶
func (us *UniswapScraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
GetDecimals returns the decimals of the token with address @tokenAddress
func (*UniswapScraper) GetName ¶
func (us *UniswapScraper) GetName(tokenAddress common.Address) (name string, err error)
func (*UniswapScraper) GetPoolByAddress ¶
Get a pool by its LP token address.
func (*UniswapScraper) GetPoolByID ¶
func (us *UniswapScraper) GetPoolByID(num int64) (dia.Pool, error)
GetPoolByID returns the Uniswap Pool with the integer id @num.
func (*UniswapScraper) Pool ¶
func (us *UniswapScraper) Pool() chan dia.Pool
type UniswapV3Scraper ¶
type UniswapV3Scraper struct {
RestClient *ethclient.Client
WsClient *ethclient.Client
// contains filtered or unexported fields
}
func NewUniswapV3Scraper ¶
func NewUniswapV3Scraper(exchange dia.Exchange) *UniswapV3Scraper
NewUniswapV3Scraper returns a new UniswapV3Scraper.
func (*UniswapV3Scraper) Done ¶
func (uas *UniswapV3Scraper) Done() chan bool
func (*UniswapV3Scraper) GetAssetFromAddress ¶
func (*UniswapV3Scraper) Pool ¶
func (uas *UniswapV3Scraper) Pool() chan dia.Pool
Click to show internal directories.
Click to hide internal directories.