{"id":23869481,"url":"https://github.com/fredwu/yield.rb","last_synced_at":"2025-09-08T19:31:17.231Z","repository":{"id":48094158,"uuid":"365525832","full_name":"fredwu/yield.rb","owner":"fredwu","description":"Aggregated token amounts and values. Supports ApeBoard, YieldWatch, Binance, CoinGecko and more.","archived":false,"fork":false,"pushed_at":"2022-11-01T11:37:44.000Z","size":45,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T05:06:07.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fredwu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-08T13:49:04.000Z","updated_at":"2022-05-04T07:25:42.000Z","dependencies_parsed_at":"2023-01-20T17:45:53.443Z","dependency_job_id":null,"html_url":"https://github.com/fredwu/yield.rb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fredwu/yield.rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fyield.rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fyield.rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fyield.rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fyield.rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fredwu","download_url":"https://codeload.github.com/fredwu/yield.rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fyield.rb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231438,"owners_count":25245585,"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-09-08T02:00:09.813Z","response_time":121,"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":"2025-01-03T12:35:39.134Z","updated_at":"2025-09-08T19:31:16.952Z","avatar_url":"https://github.com/fredwu.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yield.rb\n\nThis is a simple ruby script that pulls data from supported yield trackers and exchanges, and reconstructs them for one purpose: to get the aggregated amounts and values of underlying tokens.\n\n## Why?\n\nIn YieldWatch, as much as I love the details it provides on yields, it lacks a consolidated view on how much underlying tokens I have. Imagine having deposited tokens into multiple liquidity pools (LPs) and having to manually find and add up the underlying tokens (not LP tokens) one by one...\n\nSome other wallet trackers support this, but none of them supports all the yield farms I use.\n\nAs of July 2021, I've switched to using 0xTracker and ApeBoard. If a farm is supported in both then I'd use 0xTracker as it doesn't require a periodically updated auth token.\n\nHere's what the output data looks like:\n\n    BNB   6.9420     USD 1.23     AUD 2.34\n    BTC   0.6969     USD 12.34    AUD 23.45\n    ETH   4.2000     USD 3.45     AUD 5.67\n\n    Total USD: 17.02\n    Total AUD: 31.46\n\n## Usage\n\nCopy `config.sample.yml` to `config.yml`:\n\n    cp config{.sample,}.yml\n\n### Configurations\n\n| Option         | Type           | Description                                     |\n| -------------- | -------------- | ----------------------------------------------- |\n| format         | string         | `json` or `text`                                |\n| currencies     | array(string)  | currency ISO codes, e.g. `USD`                  |\n| rounding       | integer        | decimal rounding, defaults to 6                 |\n| token_names    | string: string | token name mapping                              |\n| token_mappings | array(string)  | token code mapping, e.g. to map `BTCB` to `BTC` |\n| hide_tokens    | array(string)  | tokens that should be hidden from output        |\n| include_tokens | string: float  | manually add tokens and their amounts           |\n\n- \u003csup\u003eIn some cases token symbols are not unique (e.g. `BUNNY` can be `Pancake Bunny`, `BunnyToken` or `Rocket Bunny`), in this case they need to be added to the `token_names` mapping. Search [CoinGecko](https://www.coingecko.com/) for their names.\u003c/sup\u003e\n\n- \u003csup\u003eThe `hide_tokens` option is useful for hiding dusts and/or tokens you don't care about.\u003c/sup\u003e\n\n- \u003csup\u003eThe `include_tokens` option is useful for adding tokens from places without APIs, such as [Nexo](https://nexo.io/). Tokens are categorised under groups (exchanges or farms, etc).\u003c/sup\u003e\n\n#### 0xTracker\n\n| Option  | Type          | Description                                 |\n| ------- | ------------- | ------------------------------------------- |\n| wallet  | string        | wallet address                              |\n| wallets | array(string) | wallets, e.g. `eth`, `bsc` and `matic`, etc |\n| farms   | array(string) | farms, e.g. `mochiswap.io, bsc`             |\n\n- \u003csup\u003eVisit [0xTracker](https://0xtracker.app/) and take a look at the GET or POST requests to find all the supported farms.\u003c/sup\u003e\n\n- \u003csup\u003eFarm entries are supplied by their name and network, e.g. `mochiswap.io, bsc`.\u003c/sup\u003e\n\n#### ApeBoard\n\n| Option     | Type          | Description                                     |\n| ---------- | ------------- | ----------------------------------------------- |\n| ape-secret | string        | value from the request header `ape-secret`      |\n| passcode   | string        | value from the request header `passcode`        |\n| wallet     | string        | wallet address                                  |\n| wallets    | array(string) | wallets, e.g. `eth`, `bsc` and `matic`, etc     |\n| farms      | array(string) | farms, e.g. `pancakeswapBsc` and `polycat`, etc |\n\n- \u003csup\u003eVisit [ApeBoard](https://apeboard.finance/) and take a look at the GET requests to find all the supported wallets and farms.\u003c/sup\u003e\n\n#### YieldWatch\n\n| Option | Type   | Description                                       |\n| ------ | ------ | ------------------------------------------------- |\n| wallet | string | wallet address                                    |\n| jwt    | string | YieldWatch JWT                                    |\n| file   | string | relative path to the YieldWatch JSON payload file |\n\n- \u003csup\u003ePlease note that if you are using the wallet address, the wallet balances will be missing from the calculation. To include the wallet balances, go to YieldWatch, fetch your wallet, and open the browser console to copy the JSON payload.\u003c/sup\u003e\n\n- \u003csup\u003eAlternatively, find the YieldWatch GET request and copy the JWT (the string after \"Authorization: Bearer \") in the header.\u003c/sup\u003e\n\n#### Binance \u0026 Bittrex\n\n| Option     | Type   | Description                                         |\n| ---------- | ------ | --------------------------------------------------- |\n| api_key    | string | API key                                             |\n| secret_key | string | secret key                                          |\n| file       | string | relative path to the JSON payload file from the API |\n\n- \u003csup\u003eThe `file` option is only needed if you don't want to supply the API and secret keys.\u003c/sup\u003e\n\n## Assumptions\n\n1. You only care about the amounts of the underlying tokens - which changes all the time due to IL ([Impermanent Loss](https://www.google.com/search?q=impermanent+loss)).\n1. Only tokens that have already been deposited into the vaults will be counted, those that are pending are ignored.\n1. Coin names on different protocols are consolidated into one, e.g. `WBNB`, `iBNB` and `beltBNB` are all consolidated into `BNB`.\n1. Only the farms and tokens I personally use have been tested.\n1. Token prices are fetched from [CoinGecko](https://www.coingecko.com/).\n\n## Supported Exchanges\n\n- [Binance](https://www.binance.com/)\n- [Bittrex](https://bittrex.com/)\n\n## Tested Farms / Yield Aggregators\n\nThese are the farms I have used and therefore their outputs are tested.\n\n- [ACryptoS](https://acryptos.com/) - BSC\n- [Adamant](https://adamant.finance/) - Polygon\n- [AutoFarm](https://autofarm.network/) - BSC, Polygon\n- [Beefy](https://beefy.finance/) - BSC, Polygon\n- [Darkside](https://darkside.finance/) - Polygon\n- [EVOdefi](https://evo-matic.com/) - Polygon\n- [Goose Finance](https://goosedefi.com/) - BSC\n- [Moonpot](https://moonpot.com/) - BSC\n- [KogeFarm](https://kogefarm.io/) - Polygon\n- [PancakeBunny](https://pancakebunny.finance/) - BSC\n- [PancakeSwap](https://pancakeswap.finance/) - BSC\n- [PolyCat](https://polycat.finance/) - Polygon\n- [PolyCrystal](https://polycrystal.finance/) - Polygon\n- [PolygonFarm](https://polygonfarm.finance/) - Polygon\n- [Sushi](https://sushi.com/) - Polygon\n\nIf a farm is supported on 0xTracker or ApeBoard, it should work fine.\n\n## Wallet Trackers\n\nThese are the BSC (Binance Smart Chain) wallet trackers I have come across.\n\n- [0xTracker](https://0xtracker.app/)\n- [ApeBoard](https://apeboard.finance/)\n- [DeBank](https://debank.com/)\n- [Farm.Army](https://farm.army/)\n- [Farmfol.io](https://farmfol.io/)\n- [Growing.fi](https://www.growing.fi/)\n- [SCV](https://scv.finance/)\n- [tin.](https://tin.network/)\n- [YieldWatch](https://www.yieldwatch.net/)\n\n## License\n\nLicensed under [MIT](http://fredwu.mit-license.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwu%2Fyield.rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffredwu%2Fyield.rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwu%2Fyield.rb/lists"}