{"id":16154377,"url":"https://github.com/giansalex/crypto-com-stoploss","last_synced_at":"2025-03-18T19:33:05.262Z","repository":{"id":48403166,"uuid":"271710522","full_name":"giansalex/crypto-com-stoploss","owner":"giansalex","description":"Stop-loss on Crypto.com Exchange (API v2)","archived":false,"fork":false,"pushed_at":"2024-06-24T22:05:54.000Z","size":141,"stargazers_count":9,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T23:22:01.410Z","etag":null,"topics":["crypto-com","crypto-com-api","stop-loss","trailing-stoploss"],"latest_commit_sha":null,"homepage":"https://platinum.crypto.com/r/chr2wsfs6g","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giansalex.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":"2020-06-12T04:47:12.000Z","updated_at":"2025-03-04T12:24:37.000Z","dependencies_parsed_at":"2024-10-27T19:11:05.987Z","dependency_job_id":"7125c0d3-781f-436f-82a9-76f08f923bd4","html_url":"https://github.com/giansalex/crypto-com-stoploss","commit_stats":{"total_commits":113,"total_committers":1,"mean_commits":113.0,"dds":0.0,"last_synced_commit":"620256961d8aeacf0a8646632d6b7cdaaaf47c91"},"previous_names":["giansalex/crypto-com-trailing-stop-loss"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fcrypto-com-stoploss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fcrypto-com-stoploss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fcrypto-com-stoploss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fcrypto-com-stoploss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giansalex","download_url":"https://codeload.github.com/giansalex/crypto-com-stoploss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244289272,"owners_count":20429168,"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":["crypto-com","crypto-com-api","stop-loss","trailing-stoploss"],"created_at":"2024-10-10T01:16:54.297Z","updated_at":"2025-03-18T19:33:00.253Z","avatar_url":"https://github.com/giansalex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto.com Stop-Loss Bot [![Go Report Card](https://goreportcard.com/badge/github.com/giansalex/crypto-com-trailing-stop-loss)](https://goreportcard.com/report/github.com/giansalex/crypto-com-trailing-stop-loss)\r\n\r\n![Crypto.com Exchange](https://raw.githubusercontent.com/giansalex/crypto-com-trailing-stop-loss/master/doc/crypto-com.png)\r\n\r\n[Crypto.com](https://crypto.com/exchange) Trailing Stop-Loss Bot and optional Telegram notifications. \r\n\r\n\u003e A trailing stop order sets the stop price at a fixed amount below the market price with an attached \"trailing\" amount. As the market price rises, the stop price rises by the trail amount, but if the stock price falls, the stop loss price doesn't change, and a market order is submitted when the stop price is hit.\r\n\r\n## Installation\r\nFollow this [guide](https://github.com/giansalex/crypto-com-trailing-stop-loss/wiki/Installation) or use [Docker image](https://hub.docker.com/r/giansalex/crypto-com-stoploss)\r\n\r\n## Run\r\n\r\nRequire [API Keys](https://crypto.com/exchange/personal/api-management).    \r\nSet Environment variables:\r\n- `CRYPTO_APIKEY`\r\n- `CRYPTO_SECRET`\r\n- `TELEGRAM_TOKEN` (optional to notify)\r\n\r\nSimple command to run bot stoploss\r\n\u003e Sell all BTC balance to market price when down 3%.\r\n```sh\r\n./crypto -pair=BTC/USDT -percent=3\r\n```\r\n\r\nFor buy orders\r\n\u003e Buy 100 USDT when `BTC` up 0.5%\r\n```sh\r\n./crypto -type=BUY -pair=BTC/USDT -percent=0.5 -amount=100\r\n```\r\n\r\nFor sell orders with static stoploss\r\n\u003e SELL 0.1 BTC when `BTC` down to 9400 USDT\r\n```sh\r\n./crypto -pair=BTC/USDT -price=9400 -amount=0.1\r\n```\r\n\r\n\r\n## Notifications\r\n\r\n- Telegram.\r\n```sh\r\n./crypto -pair=BTC/USDT -percent=3 -interval=60 -telegram.chat=\u003cuser-id\u003e\r\n```\r\n![Crypto bot Telegram](https://raw.githubusercontent.com/giansalex/crypto-com-trailing-stop-loss/master/doc/crypto-com-telegram-bot.png)\r\n\r\n\u003e For get user id, talk to the [userinfobot](https://t.me/userinfobot)\r\n\r\n\r\n- Mailing.\r\n```sh\r\n./crypto -pair=BTC/USDT -percent=3 \\\r\n      -mail.host=\"smtp.example.com\" \\\r\n      -mail.port=587 \\\r\n      -mail.user=\"user@example.com\" \\\r\n      -mail.pass=\"xxxx\" \\\r\n      -mail.from=\"user@example.com\" \\\r\n      -mail.to=\"bob@gmail.com\"\r\n```\r\n\r\n\u003e You can notify both: telegram, mail.\r\n\r\n\r\nList available parameters \r\n```sh\r\n  -amount float\r\n        (optional) amount to order (sell or buy) on stoploss\r\n  -interval int\r\n        interval in seconds to update price, example: 30 (30 sec.) (default 30)\r\n  -mail.from string\r\n        (optional) email sender\r\n  -mail.host string\r\n        (optional) SMTP Host\r\n  -mail.pass string\r\n        (optional) SMTP Password\r\n  -mail.port int\r\n        (optional) SMTP Port (default 587)\r\n  -mail.to string\r\n        (optional) email receptor\r\n  -mail.user string\r\n        (optional) SMTP User\r\n  -pair string\r\n        market pair, example: MCO/USDT\r\n  -percent float\r\n        percent (for trailing stop loss), example: 3.0 (3%)\r\n  -price float\r\n        price (for static stop loss), example: 9200.00 (BTC price)\r\n  -stop-change\r\n        Notify on stoploss change (default: false)\r\n  -telegram.chat int\r\n        (optional) telegram User ID for notify\r\n  -type string\r\n        order type: SELL or BUY (default \"SELL\")\r\n```\r\n\r\n## Signup\r\nAre you new user?, [signup](https://platinum.crypto.com/r/chr2wsfs6g) and use this referral code: `chr2wsfs6g` for earn bonus coin.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiansalex%2Fcrypto-com-stoploss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiansalex%2Fcrypto-com-stoploss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiansalex%2Fcrypto-com-stoploss/lists"}