-
Notifications
You must be signed in to change notification settings - Fork 129
Testspace: Guide: Add a new liquidity scraper
Eric Delaporte edited this page Aug 2, 2023
·
1 revision
Implement LiquidityScraper
interface at pkg/dia/scraper/liquidity-scrapers/ScraperInterface.go
file
type LiquidityScraper interface {
Pool() chan dia.Pool
Done() chan bool
}
- Add a scraper implementation,
MyLiquidityScraper.go
file topkg/dia/scraper/liquidity-scrapers/
folder implement the functions:
func (scraper *MyLiquidityScraper) Pool() chan dia.Pool {}
func (scraper *MyLiquidityScraper) Done() chan bool {}
- Add a constructor for the scraper:
func NewMyLiquidityScraper(exchange dia.Exchange) *MyLiquidityScraper {}
go mod tidy -go=1.16 && go mod tidy -go=1.17 && go install && liquidityScraper -exchange=ExchangeName
go mod tidy -go=1.16 && go mod tidy -go=1.17 && go install && liquidityScraper -exchange=EXCHANGE_NAME
- PlatypusFinance:
go mod tidy -go=1.16 && go mod tidy -go=1.17 && go install && liquidityScraper -exchange=PlatypusFinance
- Orca:
go mod tidy -go=1.16 && go mod tidy -go=1.17 && go install && SOLANA_URI_REST=https://try-rpc.mainnet.solana.blockdaemon.tech/ liquidityScraper -exchange=Orca