Categorygithub.com/fenghaojiang/uniswap-tools-go
repository
1.0.0
Repository: https://github.com/fenghaojiang/uniswap-tools-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

uniswap-tools-go

Goals

uniswap-tools-go aims to provide you a neat multi-chain solution for checking your holding positions and profit in uniswap-v3. You can request for anyone's uniswap-v3's portfolio using this toolkit in Ethereum / Polygon / Arbitrum / Optimism / BSC.

Non-goals

This project does not make money for you. It does not contain any logic that predict or something relevant to trading.

Requirements

  • Go Version: 1.19+

Get Start

go get github.com/fenghaojiang/uniswap-tools-go

Example

package main

import (
	"context"
	"fmt"
	"math/big"

	"github.com/fenghaojiang/uniswap-tools-go/client"
	"github.com/fenghaojiang/uniswap-tools-go/constants"
)

func main() {
	polygonClis, err := client.NewClientsWithEndpoints([]string{
		"https://rpc.ankr.com/polygon",
	})
	if err != nil {
		fmt.Println(err)
		return
	}
    
	results, err := polygonClis.WithLimitRPC(100).WithNetwork(constants.PolygonNetwork).AggregatedPosition(context.Background(), []*big.Int{
		new(big.Int).SetInt64(869899),
	})

	if err != nil {
		fmt.Println(err)
		return
	}
	for i := range results {
		fmt.Printf("%+v\n", results[i])
	}
}

Reference

Contribution

Any suggestions, comments (including criticisms), comments and contributions are welcome.

Buy me a coffee

In Polygon is prefered: 0xc101c69340feb4d0c474bf8fc34f5266f3de8a15