{"id":23436640,"url":"https://github.com/ln-markets/trading-bot","last_synced_at":"2026-02-07T09:32:03.133Z","repository":{"id":38190451,"uuid":"455608738","full_name":"ln-markets/trading-bot","owner":"ln-markets","description":"Algorithmic trading bot for LN Markets (https://lnmarkets.com/)","archived":false,"fork":false,"pushed_at":"2025-06-09T16:41:47.000Z","size":74,"stargazers_count":34,"open_issues_count":1,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-03T03:29:23.165Z","etag":null,"topics":["bitcoin","lightning-network","trading","trading-bot","trading-strategies"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ln-markets.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":"2022-02-04T16:00:04.000Z","updated_at":"2025-06-09T16:41:51.000Z","dependencies_parsed_at":"2025-04-13T04:14:06.662Z","dependency_job_id":"d348c869-8950-4f8d-9d13-66b2176c01b0","html_url":"https://github.com/ln-markets/trading-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ln-markets/trading-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ln-markets%2Ftrading-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ln-markets%2Ftrading-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ln-markets%2Ftrading-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ln-markets%2Ftrading-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ln-markets","download_url":"https://codeload.github.com/ln-markets/trading-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ln-markets%2Ftrading-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29191403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"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":["bitcoin","lightning-network","trading","trading-bot","trading-strategies"],"created_at":"2024-12-23T13:20:16.514Z","updated_at":"2026-02-07T09:32:03.112Z","avatar_url":"https://github.com/ln-markets.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LN Markets Technical Analysis Bot\n\nA simple bot for algorithmic trading with [Trading View Technical Analysis](https://www.tradingview.com/symbols/XBTUSD/technicals/) signals on [LN Markets](https://lnmarkets.com/).\n\n\u003e :warning: CAUTION: Use at your own risk. This repo is meant to be a reference and has been created for educational purposes only. \n\nPlease use carefully, preferably on Testnet or with small amounts.\n\n## Install\n\nDownload this Github repository and install dependencies.\n```\npip install -r requirements.txt\n```\nThis code works with LN Markets Python module \u003e= 2.0.1, released for with LN Markets API V2.\nYou can upgrade your local version running pip install ln-markets==2.0.1.\n\n## Authentication\n\n\u003e For authentication, you need your [LN Markets API](https://docs.lnmarkets.com/api/v1/) **Key**, **Secret**, and **Passphrase**.\n\nWithout them, you will not be able to authenticate.\n\n\u003e :warning: **Never share your API Key, Secret or Passphrase**\n\nOpen the 'configuration.yml' file and complete with your LN Markets API credentials.\nYou can also add the parameter network with 'testnet' for [LN Markets Testnet](https://testnet.lnmarkets.com/) and 'mainnet' for [LN Markets mainnet](https://lnmarkets.com/).\n\n## Strategies\n\nCurrent available strategies are:\n- ta_summary: use the [Trading View Technical Analysis](https://www.tradingview.com/symbols/XBTUSD/technicals/) summary indicator based on 27 signals (oscillators and moving averages) to open a long or short future position.\n- More to come\n\nMore details below.\n\nOpen the 'configuration.yml' file.\nThen choose the strategy you want for your trading bot setting True to the corresponding variable (and False to others).\n```\n# Example\nStrategies: \n  ta_summary: True\n```\n\n## Parameters\n\nIn 'configuration.yml', you can define some parameters to customize your strategy.\n\n```\n# Example\nta_summary:\n  quantity: 10 #type=int, min=1, quantity of each open position\n  leverage: 10 #type=int, min=1, max=100\n  interval: '5m' #type=string, available interval between 2 TA summary signals: \"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"1d\", \"1W\", \"1M\"\n  timeout: 60 #type=int, min=1, number of minutes the trading strat will be running  \n```\n\n## Run program\n\nOpen 'main.py' file and simply run it. If there is no error, you should see this message in the terminal:\n```\nConnection to LN Markets ok!\n```\nIf not, double check the API Key, Secret, and Passphrase you  entered.\n\n[LN Markets API](https://docs.lnmarkets.com/api/v1/) has requests limits (30 requests per minute).\n\n## ta_summary\n\nHow does it work?  \n\nOnce the bot is launched, it follows [Trading View Technical Analysis](https://www.tradingview.com/symbols/XBTUSD/technicals/) summary indicator based on 27 signals (oscillators and moving averages) to run a directional strategy. The bot opens and keeps running a long Future position while the signal is \"STRONG_BUY\" and remains at least \"BUY\", and a short Future position while the signal is \"STRONG_SELL\" and remains at least \"SELL\", and close the position otherwise..\nWhile the bot is running, you can have either 0 or 1 position running maximum. \n\n### Parameters to customize the bot\n- quantity: the quantity (in USD) for the position running\n- leverage: the leverage for the position running\n- take profit: the coefficient to apply to the entry price to compute the take profit level\n- stop loss: the coefficient to apply to the entry price to compute the stop loss level\n- interval: interval between 2 TA summary signals: \"1m\" for 1 minute, \"5m\" for 5 minutes, \"15m\" for 15 minutes, \"30m\" for 30 minutes, \"1h\" for 1 hour, \"2h\" for 2 hours, \"4h\" for 4 hours, \"1d\" for 1 day, \"1W\" for 1 week, \"1M\" for 1 month\n- interval: number of minutes the trading strat will be running\n\n```\n# Example\nta_summary:\n  quantity: 10 #type=int, min=1, quantity of each open position\n  leverage: 10 #type=int, min=1, max=100\n  takeprofit: 0.02 #type=float, price to reach above (for long) or below (for short) entry price to take profit, 0.2 means take profit 20% above or below entry price \n  stoploss: 0.02 #type=float, price to reach below (for long) or above (for short) entry price to stop loss, 0.1 means stop loss 10% below or above entry price\n  interval: '5m' #type=string, available interval between 2 TA summary signals: \"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"1d\", \"1W\", \"1M\"\n  timeout: 60 #type=int, min=1, number of minutes the trading strat will be running\n```\n\n## History of trades\n\nAfter timeout, you will find all the bot's trades during its execution in the CSV 'df_closed_pos.csv' in the folder Strategies.\n\n## To go further\n\nFeel free to customize the bot and add your own strategies.\n\nIf you want to use more features from [LN Markets API](https://docs.lnmarkets.com/api/v1/), check out the full documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fln-markets%2Ftrading-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fln-markets%2Ftrading-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fln-markets%2Ftrading-bot/lists"}