{"id":20182940,"url":"https://github.com/theogravity/binance-trailing-stop-loss-bot","last_synced_at":"2026-03-09T15:02:03.267Z","repository":{"id":40347675,"uuid":"144661426","full_name":"theogravity/binance-trailing-stop-loss-bot","owner":"theogravity","description":"An example crypto trading bot that does a trailing stop loss on Binance and posts to Slack","archived":false,"fork":false,"pushed_at":"2025-06-03T08:20:50.000Z","size":99,"stargazers_count":23,"open_issues_count":27,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-21T08:53:27.753Z","etag":null,"topics":["binance","loss","stop","trailing"],"latest_commit_sha":null,"homepage":"","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/theogravity.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":"2018-08-14T03:04:07.000Z","updated_at":"2024-05-19T22:14:04.000Z","dependencies_parsed_at":"2025-04-10T05:32:40.948Z","dependency_job_id":"631d0391-d5c4-42ae-9235-fd9714d10b7c","html_url":"https://github.com/theogravity/binance-trailing-stop-loss-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theogravity/binance-trailing-stop-loss-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theogravity%2Fbinance-trailing-stop-loss-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theogravity%2Fbinance-trailing-stop-loss-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theogravity%2Fbinance-trailing-stop-loss-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theogravity%2Fbinance-trailing-stop-loss-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theogravity","download_url":"https://codeload.github.com/theogravity/binance-trailing-stop-loss-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theogravity%2Fbinance-trailing-stop-loss-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30299851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T14:33:48.460Z","status":"ssl_error","status_checked_at":"2026-03-09T14:33:48.027Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["binance","loss","stop","trailing"],"created_at":"2024-11-14T02:43:24.913Z","updated_at":"2026-03-09T15:02:03.235Z","avatar_url":"https://github.com/theogravity.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trading-bot-example\n\nSomething I built in hours to impl trailing stop losses on the sell side via Binance.\n\n# Disclaimer\n\nCode is really messy, use at your own risk. The code will have bugs, the numbers may\nbe inaccurate, etc. I take no responsibility for any losses or damage you may\nincur running this code.\n\nI OFFER NO SUPPORT FOR THIS CODE.\n\n## Installation\n\n### Install modules\n\n(it is not published on npm)\n\n`npm i`\n\n### Configure API keys\n\nopen `sell-stop-limit.cmd.js` and find the appropriate places where it asks for an API key at the\ntop of the file.\n\nYou will need the following\n\n- Binance API key / secret\n- (optional) Slack bot token / your slack username that the bot can message you with\n\n## Usage\n\n`npm run trade sell-stop-limit --help`\n\nNote: This bot only creates a limit order when stop loss is reached. It does *not*\ncreate a stop-loss order (it does the stop loss tracking itself)\n\n### Example usage\n\n- Sets the trading pair to XLM/USDT\n- Maintains the stop loss price to be (`Market price - 0.01600`)\n- Sets the limit price on stop loss trigger to (`Stop price - 0.00100`)\n- When the price advances, reduce the stop loss gap by `0.75%`, up to a max of `80%`\n- Simulate the trade (does not actually execute the order when stop loss is triggered)\n\n```\nnpm run trade sell-stop-limit --tradePair XLM/USDT \\\n--sell.stopOffsetPrice 0.01600 --sell.limitOffsetPrice 0.00100 \\\n--sell.reduceStopOffsetPriceBy .75 --sell.reduceStopOffsetPriceByMax 80 \\\n--simulate\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheogravity%2Fbinance-trailing-stop-loss-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheogravity%2Fbinance-trailing-stop-loss-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheogravity%2Fbinance-trailing-stop-loss-bot/lists"}