{"id":19149579,"url":"https://github.com/zeriontech/defi-sdk-go","last_synced_at":"2025-07-13T18:40:22.387Z","repository":{"id":57532662,"uuid":"264576038","full_name":"zeriontech/defi-sdk-go","owner":"zeriontech","description":"Go wrapper for DeFi SDK","archived":false,"fork":false,"pushed_at":"2020-07-08T09:03:54.000Z","size":22,"stargazers_count":13,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T04:44:25.516Z","etag":null,"topics":["dapp","defi","defi-sdk","ethereum"],"latest_commit_sha":null,"homepage":"https://docs.zerion.io","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/zeriontech.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}},"created_at":"2020-05-17T03:29:57.000Z","updated_at":"2025-01-29T07:53:25.000Z","dependencies_parsed_at":"2022-09-26T18:22:08.319Z","dependency_job_id":null,"html_url":"https://github.com/zeriontech/defi-sdk-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeriontech/defi-sdk-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeriontech%2Fdefi-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeriontech%2Fdefi-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeriontech%2Fdefi-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeriontech%2Fdefi-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeriontech","download_url":"https://codeload.github.com/zeriontech/defi-sdk-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeriontech%2Fdefi-sdk-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265189044,"owners_count":23725199,"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","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":["dapp","defi","defi-sdk","ethereum"],"created_at":"2024-11-09T08:08:51.012Z","updated_at":"2025-07-13T18:40:22.353Z","avatar_url":"https://github.com/zeriontech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# defi-sdk-go\nThis library is a simple Go wrapper for DeFi SDK.\n\nVisit [docs.zerion.io](docs.zerion.io) for full documentation. \n\n#  Install \n```bash\n$ go get github.com/zeriontech/defi-sdk-go\n```\n# Usage\n\n## Initialize DeFiSDK\nDeFi SDK directly connects to the Ethereum blockchain. You are welcome to use an Ethereum node of your choice to start using DeFi SDK. \nIf you don't have a node, in the example below you can use a node provided by Cloudflare and served through our domain. \n\n```golang\npackage main\n\nimport defisdk \"github.com/zeriontech/defi-sdk-go\"\n\nfunc main() {\n\tethereumNodeUrl := \"https://eth-mainnet.zerion.io/\"\n\tsdk := defisdk.New(ethereumNodeUrl)\n}\n```\n## Examples\n### Get supported protocols\n```go\nsdk.GetSupportedProtocols()\n// [PieDAO Multi-Collateral Dai Bancor DeFi Money Market TokenSets 0x Staking Uniswap V1 Synthetix PoolTogether Dai Savings Rate Chai iearn.finance (v3) iearn.finance (v2) Idle dYdX Curve Compound Balancer Aave]\n```\n### Get account balance locked in a protocol\n```go\nuserAddress := \"0xa218a8346454c982912cf6d14c714663c2d510d8\"\nprotocol := \"Aave\"\n\nsdk.GetProtocolBalance(userAddress, protocol)\n// [{\n// Metadata:{\n//     Name:Aave \n//     Description:Decentralized lending \u0026 borrowing protocol \n//     WebsiteURL:aave.com \n//     IconURL:protocol-icons.s3.amazonaws.com/aave.png \n//     Version:+0\n// } \n// AdapterBalances:[{\n//     Metadata:{\n//         AdapterAddress:[139 98 192 32 145 254 6 174 52 84 211 193 41 33 179 38 17 186 85 1] \n//         AdapterType:Asset\n//     } \n//     Balances:[{\n//         Base:{\n//             Metadata:{\n//                 Token:[252 30 105 15 97 239 217 97 41 75 62 28 227 49 63 189 138 164 248 93] \n//                 Name:Aave Interest bearing DAI \n//                 Symbol:aDAI \n//                 Decimals:18\n//             } \n//             Amount:+1008383439792242970\n//         } \n//         Underlying:[{\n//             Metadata:{\n//                 Token:[107 23 84 116 232 144 148 196 77 169 139 149 78 237 234 196 149 39 29 15] \n//                 Name:Dai Stablecoin \n//                 Symbol:DAI \n//                 Decimals:18\n//             } \n//             Amount:+1008383439792242970\n//         }]\n//     }]\n// }]\n// }]\n```\n\n### Get supported token types\n```go\nsdk.GetTokenAdapterNames()\n// [PieDAO Pie Token SmartToken MToken SetToken Uniswap V1 pool token PoolTogether pool Chai token YToken IdleToken Curve pool token CToken Balancer pool token AToken ERC20]\n```\n\n### Get derivative token underlying components\n```go\nuniswapDaiPool := \"0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667\"\nsdk.GetTokenComponents(\"Uniswap V1 pool token\", uniswapDaiPool)\n\n// [{\n// Metadata:{\n//     Token:[238 238 238 238 238 238 238 238 238 238 238 238 238 238 238 238 238 238 238 238] \n//     Name:Ether \n//     Symbol:ETH \n//     Decimals:18\n// } \n// Amount:+1108093230485279057\n// } \n// {\n// Metadata:{\n//     Token:[107 23 84 116 232 144 148 196 77 169 139 149 78 237 234 196 149 39 29 15] \n//     Name:Dai Stablecoin \n//     Symbol:DAI \n//     Decimals:18\n// } \n// Amount:+221366932637588225901\n// }]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeriontech%2Fdefi-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeriontech%2Fdefi-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeriontech%2Fdefi-sdk-go/lists"}