{"id":27429442,"url":"https://github.com/byteball/trading-tips","last_synced_at":"2025-06-29T13:04:56.317Z","repository":{"id":72989958,"uuid":"330492572","full_name":"byteball/trading-tips","owner":"byteball","description":"A trading tips library for bonded stablecoins","archived":false,"fork":false,"pushed_at":"2021-02-22T11:05:26.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T14:17:48.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/byteball.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,"zenodo":null}},"created_at":"2021-01-17T21:43:52.000Z","updated_at":"2021-02-22T11:05:29.000Z","dependencies_parsed_at":"2023-05-15T04:00:38.084Z","dependency_job_id":null,"html_url":"https://github.com/byteball/trading-tips","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/byteball/trading-tips","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Ftrading-tips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Ftrading-tips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Ftrading-tips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Ftrading-tips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byteball","download_url":"https://codeload.github.com/byteball/trading-tips/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Ftrading-tips/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262598166,"owners_count":23334669,"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":[],"created_at":"2025-04-14T14:17:46.874Z","updated_at":"2025-06-29T13:04:56.285Z","avatar_url":"https://github.com/byteball.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trading tips library\n\nThis library checks for opportunities to make money by buying/selling [Obyte bonded stablecoins](https://ostable.org) when the price of a token is away from the target price.\n\nUse it in your trading bots or for notifications.\n\n## Usage\n\n```js\nconst tradingTips = require('trading-tips');\n\n// get all tips available now\nconst all_tips = await tradingTips.getAllTips();\n\n// get tips available on a specific AA only\nconst all_tips = await tradingTips.getTipsByAA('26XAPPPTTYRIOSYNCUV3NS2H57X5LZLJ');\n\n// be notified about new opportunities that result from new requests that move the price\ntradingTips.subscribeToRequests(tips =\u003e {\n\tconsole.log('new tips', tips);\n}, 10 * 1000);\n\n// be notified about new opportunities that result from oracle price change\ntradingTips.subscribeToOracleUpdates(tips =\u003e {\n\tconsole.log('new tips', tips);\n}, 10 * 1000);\n\n// be notified about all new opportunities\ntradingTips.subscribe(tips =\u003e {\n\tconsole.log('new tips', tips);\n}, 10 * 1000);\n\n```\n\nThe `tip` object is a trading recommendation that looks like\n```js\n{\n\taa: 'Z7GNZCFDEWFKYOO6OIAZN7GH7DEKDHKA',\n\taction: 'buy',\n\ttoken_role: 'T1',\n\ttoken: 'GRB',\n\treserve_token: 'GBYTE',\n\tcurrent_price: 281.98184269925434,\n\ttarget_price: 289.44005973691606,\n\tprice_difference_percentage: 2.644928115324155,\n\tmax_amount: 2.148281867\n}\n```\nHere, `action` is the recommended trade against token `token`, `max_amount` is the amount (in `token`) to buy/sell that would fully restore the peg, `current_price` is the price per token when buying/selling a small amount of `token` (10% of `max_amount`), `target_price` is the price per token after the peg is restored.\n\nThe trading recommendations are not financial advice, use at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteball%2Ftrading-tips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteball%2Ftrading-tips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteball%2Ftrading-tips/lists"}