{"id":50263724,"url":"https://github.com/hadif1999/pycoin","last_synced_at":"2026-05-27T12:11:24.030Z","repository":{"id":164965654,"uuid":"640346766","full_name":"hadif1999/pycoin","owner":"hadif1999","description":"a lovable data analysis and algorithmic trading library for cryptocurrencies","archived":false,"fork":false,"pushed_at":"2024-05-29T10:41:04.000Z","size":20494,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-29T08:11:59.823Z","etag":null,"topics":["algorithmic-trading","crypto-trading-bot","cryptobot","cryptocurrencies","cryptocurrency","cryptocurrency-exchanges","quantitative-finance","quantitative-trading","tradebot","trading","trading-bot","trading-strategies"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pythoncoin/","language":"Python","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/hadif1999.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}},"created_at":"2023-05-13T19:29:11.000Z","updated_at":"2024-11-25T17:26:46.000Z","dependencies_parsed_at":"2024-02-25T18:32:30.048Z","dependency_job_id":"61f0540e-3e5e-4097-b1e6-cf053196e4b1","html_url":"https://github.com/hadif1999/pycoin","commit_stats":null,"previous_names":["hadif1999/pycoin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hadif1999/pycoin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadif1999%2Fpycoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadif1999%2Fpycoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadif1999%2Fpycoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadif1999%2Fpycoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadif1999","download_url":"https://codeload.github.com/hadif1999/pycoin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadif1999%2Fpycoin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33565441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":["algorithmic-trading","crypto-trading-bot","cryptobot","cryptocurrencies","cryptocurrency","cryptocurrency-exchanges","quantitative-finance","quantitative-trading","tradebot","trading","trading-bot","trading-strategies"],"created_at":"2026-05-27T12:11:21.930Z","updated_at":"2026-05-27T12:11:24.022Z","avatar_url":"https://github.com/hadif1999.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![pycoin](https://github.com/hadif1999/pycoin/blob/master/pics/pycoin_logo_raw_nobg.png?raw=true)\n# Pycoin\n\n## a lovable data analysis and algorithmic trading library for cryptocurrencies :moneybag:\nincluding tools for deploying any strategy including pattern based strategies,\nPrice Action strategies, Indicator based strategies and also Machine learning based strategies. \nable to run multi strategy instances on a single bot as a webapp and a lot more...\n## what can this package do:\n- [x] download market historical data for all symbols from almost all exchanges thanks to [ccxt](https://github.com/ccxt/ccxt) :chart_with_upwards_trend: \n- [x] visualizing capabilities to easily analyze market using [plotly](https://github.com/plotly/plotly.py) :chart_with_downwards_trend:\n- [x] able to perform some useful analysis such as finding market trend according to market past high and lows, finding market important levels (like support and resistance) and more :bar_chart:\n- [ ] able to define your strategy, backtest it, run it in dry run mode and also in real mode :mag: (soon)\n- [ ] using telegram bot and webapp to control and monitor your bot :robot: (soon)  \n- [ ] run multiple strategy instances for each user as a single bot. (soon) \n\n\u003e[!NOTE]\n\u003e**for usage examples please checkout [examples](https://github.com/hadif1999/pycoin/tree/master/examples) folder and open provided notebooks and run each cell.**\n\n## Installation\n\n\u003e[!NOTE]\n\u003e for installation on Google Colab notebook please refer to **installation on google colab** section \n\n### via cloning (recommended)\n```bash\npip install -e git+https://github.com/hadif1999/pycoin.git#egg=\"pythoncoin\" \n```\nif you need extra dependencies such as ploting or AI packages add **[extra]**(name of extra dependency that will be mentioned below) to end of \"pythoncoin\" (keep using quotes)\n\nexample of installing plotting and jupyter dependencies:\n```bash\npip install -e git+https://github.com/hadif1999/pycoin.git#egg=\"pythoncoin[jupyter,plot]\" \n```\n**please be careful not to use spaces between extra packages list**\n\navailable extra packages:\n- **plot**: installs packages related to plotting.\n- **jupyter**: installs packages related to using in jupyter notebook.\n- **ai**: installs packages related to using AI features.\n- **hdf5**: installs packages related to big data features.\n- **all**: installs all available dependencies.\n\n### installing from PyPI\n#### installation with standard dependencies\n```bash\n!pip install \"pythoncoin\"\n```\n#### installation with extra dependencies\n```bash \n!pip install \"pythoncoin[plot]\"\n```\nas mentioned earlier you can also use **ai**, **plot**, **jupyter**, **hdf5** or **all** to install needed extra dependencies.\n\n### installation on Google Colab \nbefore using above installation methods on Google Colab first you have to install ta-lib\nproperly using conda, you use a conda alternative for colab like [condacolab](https://github.com/conda-incubator/condacolab).\n```python\n!pip install -q condacolab\nimport condacolab\ncondacolab.install()\n!conda install -c conda-forge ta-lib\n```\nthen you can use one of the installation methods that mentioned earlier to install pycoin.\nfor example:\n```bash\n!pip install \"pythoncoin[plot]\" \n```\nfinally you can verify installation by running: \n```python\nimport pycoin\n``` \nrestart the runtime if colab asked for it.\n\n## Quick start\n\nafter installation you can run below code to download market historical data:\n\n```python \n\nfrom pycoin.data_gathering import KlineData_Fetcher\nimport datetime as dt\n\ndf = KlineData_Fetcher(symbol=\"BTC/USDT\", \n                       timeframe=\"4h\", \n                       data_exchange=\"binance\",\n                       since = dt.datetime(2020, 1, 1)\n                       )\n\n```\n\n### ploting the candlestick data\n```python\n\nfrom pycoin.plotting import Market_Plotter\n\nplots = Market_Plotter(OHLCV_df=df)\n\n# if plot_by_grp is False then it will plot the whole candlestick data\nfigure = plots.plot_market()\n\n# if plot_by_grp is True you can plot candlestick data by group and plot a specific year, month,etc.\nfigure = plots.plot_market(plot_by_grp=True, grp={\"year\":2023, \"month\":2})\nfigure.show()\n```\n\n![alt text](https://github.com/hadif1999/pycoin/blob/master/pics/btc_h4_2023.2_candlestick.png?raw=true)\n\n### evaluating market high \u0026 lows\n```python\nfrom pycoin.data_gathering import get_market_High_Lows\ndf = get_market_High_Lows(df, candle_range = 100)\ndf                                                     \n```\n**candle_range** : range of candles to look for high and lows \n![alt text](https://github.com/hadif1999/pycoin/blob/master/pics/HighLow_df.png?raw=true)\n\n### ploting market high and lows\n```python\n\nplots.plot_high_lows(df, R = 800, y_scale= 0.5)\n\n```\n![alt text](https://github.com/hadif1999/pycoin/blob/master/pics/btc_h4_HighLows_2020:2024.png?raw=true)\n\nthe method above puts a circle for each high and low. \nR is the radius and y_scale can scale the price in y axis for better visualizing.\n\n### evaluate market trend with high and lows\nevery trend that is found with any method such as high \u0026 lows, SMA,etc. adds a new column that holds the trend label for each row of data, and when you want to plot these trend you should give this column name to draw_trend_highlight method.\n\n```python\n# finding trend \nfrom pycoin.data_gathering import Trend_Evaluator\ndf = Trend_Evaluator.eval_trend_with_high_lows(df, HighLow_range=100)\n\n# ploting trend\nplots.draw_trend_highlight(\"high_low_trend\", df, \n                           add_high_lows_shapes = True,\n                           R = 10000, # circle size of high and lows \n                           y_scale = 0.1 # scales y dim of circles \n                           )\n\n```\n![alt text](https://github.com/hadif1999/pycoin/blob/master/pics/btc_h4_2020:2023_trend.png?raw=true)\n### evaluate trend using MACD + Signal\n```python\n\ndf = Trend_Evaluator.eval_trend_with_MACD(df, drop_MACD_col = True)\nplots.draw_trend_highlight(\"MACD_trend\", df)\n\n```\n![alt text](https://github.com/hadif1999/pycoin/blob/master/pics/btc_h4_2020:2023_MACD_trend.png?raw=true)\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadif1999%2Fpycoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadif1999%2Fpycoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadif1999%2Fpycoin/lists"}