{"id":21347114,"url":"https://github.com/kybernetwork/pancake-v3-sdk","last_synced_at":"2025-07-29T05:07:05.433Z","repository":{"id":180103948,"uuid":"664582494","full_name":"KyberNetwork/pancake-v3-sdk","owner":"KyberNetwork","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-19T08:58:17.000Z","size":47,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-12T18:00:06.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KyberNetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-10T09:47:56.000Z","updated_at":"2024-12-13T07:28:13.000Z","dependencies_parsed_at":"2024-11-22T02:12:49.287Z","dependency_job_id":"93c21dc9-6037-4225-820d-9fd36190f7d3","html_url":"https://github.com/KyberNetwork/pancake-v3-sdk","commit_stats":null,"previous_names":["kybernetwork/pancake-v3-sdk"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/KyberNetwork/pancake-v3-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Fpancake-v3-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Fpancake-v3-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Fpancake-v3-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Fpancake-v3-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KyberNetwork","download_url":"https://codeload.github.com/KyberNetwork/pancake-v3-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyberNetwork%2Fpancake-v3-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267632925,"owners_count":24118750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T02:12:42.865Z","updated_at":"2025-07-29T05:07:05.398Z","avatar_url":"https://github.com/KyberNetwork.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pancake V3 SDK\n\n[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://pkg.go.dev/github.com/KyberNetwork/pancake-v3-sdk)\n[![Test](https://github.com/KyberNetwork/pancake-v3-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/KyberNetwork/pancake-v3-sdk/actions/workflows/test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/KyberNetwork/pancake-v3-sdk)](https://goreportcard.com/report/github.com/KyberNetwork/pancake-v3-sdk)\n\n🛠 A Go SDK for building applications on top of Pancake V3\n\n## Installation\n\n```sh\ngo get github.com/KyberNetwork/pancake-v3-sdk\n```\n\n## Usage\n\nThe following example shows how to create a pool, and get the inputAmount\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"math/big\"\n\n\tcore \"github.com/daoleno/uniswap-sdk-core/entities\"\n\t\"github.com/KyberNetwork/pancake-v3-sdk/constants\"\n\t\"github.com/KyberNetwork/pancake-v3-sdk/entities\"\n\t\"github.com/KyberNetwork/pancake-v3-sdk/utils\"\n\t\"github.com/ethereum/go-ethereum/common\"\n)\n\nvar (\n\tUSDC     = core.NewToken(1, common.HexToAddress(\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"), 6, \"USDC\", \"USD Coin\")\n\tDAI      = core.NewToken(1, common.HexToAddress(\"0x6B175474E89094C44Da98b954EedeAC495271d0F\"), 18, \"DAI\", \"Dai Stablecoin\")\n\tOneEther = big.NewInt(1e18)\n)\n\nfunc main() {\n\t// create demo ticks\n\tticks := []entities.Tick{\n\t\t{\n\t\t\tIndex:          entities.NearestUsableTick(utils.MinTick, constants.TickSpacings[constants.FeeLow]),\n\t\t\tLiquidityNet:   OneEther,\n\t\t\tLiquidityGross: OneEther,\n\t\t},\n\t\t{\n\t\t\tIndex:          entities.NearestUsableTick(utils.MaxTick, constants.TickSpacings[constants.FeeLow]),\n\t\t\tLiquidityNet:   new(big.Int).Mul(OneEther, constants.NegativeOne),\n\t\t\tLiquidityGross: OneEther,\n\t\t},\n\t}\n\n\t// create tick data provider\n\tp, err := entities.NewTickListDataProvider(ticks, constants.TickSpacings[constants.FeeLow])\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// new pool\n\tpool, err := entities.NewPool(USDC, DAI, constants.FeeLow, utils.EncodeSqrtRatioX96(constants.One, constants.One), OneEther, 0, p)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// USDC -\u003e DAI\n\toutputAmount := core.FromRawAmount(DAI, big.NewInt(98))\n\tinputAmount, _, err := pool.GetInputAmount(outputAmount, nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(inputAmount.ToSignificant(4))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkybernetwork%2Fpancake-v3-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkybernetwork%2Fpancake-v3-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkybernetwork%2Fpancake-v3-sdk/lists"}