{"id":18029458,"url":"https://github.com/morucci/coinbot","last_synced_at":"2026-01-19T03:32:54.813Z","repository":{"id":142717077,"uuid":"221405580","full_name":"morucci/coinbot","owner":"morucci","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-14T21:27:50.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T21:14:18.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"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/morucci.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-13T08:08:57.000Z","updated_at":"2020-12-27T11:01:43.000Z","dependencies_parsed_at":"2024-07-12T08:05:23.439Z","dependency_job_id":null,"html_url":"https://github.com/morucci/coinbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/morucci/coinbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morucci%2Fcoinbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morucci%2Fcoinbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morucci%2Fcoinbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morucci%2Fcoinbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morucci","download_url":"https://codeload.github.com/morucci/coinbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morucci%2Fcoinbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28560354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-10-30T09:09:42.416Z","updated_at":"2026-01-19T03:32:54.798Z","avatar_url":"https://github.com/morucci.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoinBot\n\nCoinBot is a set of tools to automate multi crypto currencies\ntrading. It is based on 3 tools:\n\n1. `fetcher` to get historical data from the exchange\n2. `decider` to process historical data to find new trades or update\n   existing ones\n3. `trader` to manage the trades (trading plan) and the capital (money\n   management)\n\nThe first trading strategy is a daily trend following strategy that\nstarts on bollinger bands breakout when the coin has already its EMA20\non top of the EMA50.\n\nThe trend is followed according to an ATR stop loss and 50% profit is\ntaken when 1R is reached to allow the system to continue to have\ncapital to invest. R = entry - initial stop.\n\nThe sizing of the position is done according to the maximum risk\nallowed per trade. For example if we allow only 1% risk on our\ncapital, the position size will be: (capital * 1%) / R.\n\nThe number of positions at risk will be a parameter of the `trader`\ntool. For example, if we go with 5 positions at risk, we have a\npermanent 5% risk for the whole portfolio.\n\nAs soon as a position reaches 1R, the stop loss is put at the entry\nlevel and the position is no more considered at risk and we can take\na new one at risk.\n\nWe'll implement the `trader` tool first and then the `fetcher` and\n`decider`.\n\n## fetcher\n\nTBD\n\n## decider\n\nTBD\n\n## trader\n\n`trader` is using the Binance exchange to take advantage of the OCO\norders and the good liquidity of this exchange. If volunteers want to\nsupport other exchanges, PR are welcome.\n\n`trader` is a daemon program (running all the time). We interact with\nit through interactive commands:\n\n* `trade BNBBTC 0.0022066 0.00233` to create a trade on the BNB/BTC\n  pair as soon as the price is above 0.00233 BTC with an initial stop\n  loss at 0.0022066 BTC.\n* `positions` lists current positions.\n* `trades` lists current trades.\n* `orders` lists current orders.\n* `capital` displays current realized capital. Or set the allocated\n  capital if an argument is passed.\n* `risk` displays current risk and global allowed risk.\n* `stop BNBBTC 0.0025` chnage the stop loss level for a trade. If the\n  trade is already an active position, the stop loss is chnaged on the\n  exchange. If the trade isn't a position, the position size is\n  recomputed according to the new stop loss and the current realized\n  capital.\n* `close BNBBTC` closes a trade on the BNB/BTC pair by canceling all\n  the open orders and issuing a market order if the trade is an open\n  position else it just cancels the trade.\n* `save` the current state of the trades.\n* `exit` without saving. To exit and save, just issue a `Ctrl-D`.\n\nA trade can have the following states:\n\n* `entry` waiting for the trade to become a position by having the\n  entry order executed (1 buy stop-limit). That's the initial state\n  when a `trade` command has been issued.\n* `suspended` waiting for a new available position when the maximum\n  number of risky positions are at risk.\n* `risky` when the position is between the stop loss and the R1 level\n  (entry + 1R). It means there are 2 orders for this state: one OCO\n  for 50% of the position (limit at R1 and stop) and the other 50%\n  with a stop.\n* `trendy` when the position has already reached the R1 level so there\n  is only 50% remaining of the initial position size. There is only\n  one stop order in this state and it is at the minimum on the entry\n  level.\n* `exited` when there is no more position and no more orders on the\n  market. It can happen after a `close` command or a stop level has\n  been reached.\n\n`trader` manages the capital allocated to the trading. If there is\nmore on the account, it manages only the part that has been\nallocated. When there are gains or losses, the capital is adjusted\nautomatically to benefit from compound interests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorucci%2Fcoinbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorucci%2Fcoinbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorucci%2Fcoinbot/lists"}