{"id":18834464,"url":"https://github.com/shirosaidev/stockbot","last_synced_at":"2025-10-25T05:43:51.441Z","repository":{"id":49470573,"uuid":"250616216","full_name":"shirosaidev/stockbot","owner":"shirosaidev","description":"Alpaca algo stock trading bot","archived":false,"fork":false,"pushed_at":"2022-03-27T04:19:48.000Z","size":169,"stargazers_count":185,"open_issues_count":3,"forks_count":42,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-21T12:49:32.940Z","etag":null,"topics":["algo-trading","algorithmic-trading","alpaca","alpaca-markets","alpaca-trading-api","auto-trading","nasdaq","python","stock-market","stock-prediction","stock-trading","stocks","trade","trading-algorithms"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shirosaidev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-27T18:38:21.000Z","updated_at":"2025-08-20T13:53:46.000Z","dependencies_parsed_at":"2022-09-22T19:40:26.662Z","dependency_job_id":null,"html_url":"https://github.com/shirosaidev/stockbot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shirosaidev/stockbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirosaidev%2Fstockbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirosaidev%2Fstockbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirosaidev%2Fstockbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirosaidev%2Fstockbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shirosaidev","download_url":"https://codeload.github.com/shirosaidev/stockbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirosaidev%2Fstockbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280911393,"owners_count":26412207,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"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":["algo-trading","algorithmic-trading","alpaca","alpaca-markets","alpaca-trading-api","auto-trading","nasdaq","python","stock-market","stock-prediction","stock-trading","stocks","trade","trading-algorithms"],"created_at":"2024-11-08T02:12:32.749Z","updated_at":"2025-10-25T05:43:51.415Z","avatar_url":"https://github.com/shirosaidev.png","language":"Python","funding_links":["https://www.patreon.com/shirosaidev","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CLF223XAS4W72"],"categories":[],"sub_categories":[],"readme":"# stockbot\nAlpaca algo stock trading bot\n\n[![License](https://img.shields.io/github/license/shirosaidev/stockbot.svg?label=License\u0026maxAge=86400)](./LICENSE)\n[![Release](https://img.shields.io/github/release/shirosaidev/stockbot.svg?label=Release\u0026maxAge=60)](https://github.com/shirosaidev/stockbot/releases/latest)\n[![Sponsor Patreon](https://img.shields.io/badge/Sponsor%20%24-Patreon-brightgreen.svg)](https://www.patreon.com/shirosaidev)\n[![Donate PayPal](https://img.shields.io/badge/Donate%20%24-PayPal-brightgreen.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CLF223XAS4W72)\n\nGet recommended buy and strong buy stocks daily from Nasdaq.com and get prices from Yahoo and determine which stocks moved the most the previous n days, sort those by largest movers (based on open/close $) and buy those stocks if they are going up. When the stock price goes up enough, or at the end of the market day, sell any purchased stocks.\n\n\n## Options\n\nTrade algo can be set to:\n\n\"moved\" - uses which stock moved the most in past n days (n days set in config) (default) \n\n\"lowtomarket\" - uses low price to market price\n\n\"lowtohigh\" - uses low price to high price\n\nBuy time can bet set to:\n\n\"buyatopen\" - buy the stocks when market opens and sell when price increases enough or at end of day, whatever comes first\n\n\"buyatclose\" - buy the stocks before market closes, and hold until next day, if stock price goes up enough sell, or sell at end of next market day\n\n## Slack workspace\nJoin the conversation, get support, etc on [stocksight Slack](https://join.slack.com/t/stocksightworkspace/shared_invite/enQtNzk1ODI0NjA3MTM4LTA3ZDA0YzllOGNiM2I5ZjAzYWM2MjNmMjI0OTRlY2ZjYTk1NmM5YmEwMmMwOTE2OTNiMGZlNzdjZmZkM2RjM2U).\n\n## Requirements\n\nUses Alpaca https://alpaca.markets/ for trading. You will need an account with Alpaca to use stockbot.\n\nSet env vars for Alpaca authentication api keys:\n\n```sh\nexport APCA_API_KEY_ID=\u003ckey_id\u003e\nexport APCA_API_SECRET_KEY=\u003csecrect_key\u003e\nexport APCA_API_BASE_URL=url\n```\n\nurl set to:\n\nhttps://api.alpaca.markets (for live)\n\nhttps://paper-api.alpaca.markets (for paper)\n\n\nInstall requirements Alpaca python library:\n\n```sh\npip3 install -r requirements.txt\n```\n\n### Download\n\n```shell\n$ git clone https://github.com/shirosaidev/stockbot.git\n$ cd stockbot\n```\n[Download latest version](https://github.com/shirosaidev/stockbot/releases/latest)\n\n## How to use\n\nCopy sample config:\n\n```sh\ncp config.py.sample config.py\n```\n\nEdit config.py and adjust settings as needed.\n\nRun stockbot:\n\n```sh\npython3 stockbot.py -t \u003ctradealgo\u003e -b \u003cbuytime\u003e\n```\n\nStockbot runs in an infinite loop and does daily trading. To stop it, press ctrl+c. Stocks will manually have to be sold on Alpaca web site since stockbot does not keep track of stocks when you exit it.\n\n\n## Disclaimer\n\nThis software is for educational purposes only. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS. Do not risk money which you are afraid to lose. There might be bugs in the code - this software DOES NOT come with ANY warranty.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshirosaidev%2Fstockbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshirosaidev%2Fstockbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshirosaidev%2Fstockbot/lists"}