{"id":18264724,"url":"https://github.com/mousazourob/pytrader","last_synced_at":"2026-02-03T15:04:29.482Z","repository":{"id":43025609,"uuid":"275685415","full_name":"MousaZourob/PyTrader","owner":"MousaZourob","description":"Automatic trading bot that uses market data to buy or sell stocks (back-end for Falcon)","archived":false,"fork":false,"pushed_at":"2021-10-04T17:37:55.000Z","size":35,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-19T18:59:59.943Z","etag":null,"topics":["alpaca-api","aws-chalice","aws-lambda","json","python","tradingview-webhook-api"],"latest_commit_sha":null,"homepage":"","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/MousaZourob.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}},"created_at":"2020-06-28T23:22:43.000Z","updated_at":"2024-07-11T00:32:44.000Z","dependencies_parsed_at":"2022-09-06T05:00:57.808Z","dependency_job_id":null,"html_url":"https://github.com/MousaZourob/PyTrader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MousaZourob/PyTrader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MousaZourob%2FPyTrader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MousaZourob%2FPyTrader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MousaZourob%2FPyTrader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MousaZourob%2FPyTrader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MousaZourob","download_url":"https://codeload.github.com/MousaZourob/PyTrader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MousaZourob%2FPyTrader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T14:55:20.264Z","status":"ssl_error","status_checked_at":"2026-02-03T14:55:19.725Z","response_time":96,"last_error":"SSL_read: 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":["alpaca-api","aws-chalice","aws-lambda","json","python","tradingview-webhook-api"],"created_at":"2024-11-05T11:15:45.103Z","updated_at":"2026-02-03T15:04:28.763Z","avatar_url":"https://github.com/MousaZourob.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTrader\n### Overview:\nAutomatic trading bot that streams market data of specific instruments to buy or sell them by placing bracket orders (back-end for \u003ca href=\"https://github.com/MousaZourob/Falcon\"\u003eFalcon\u003c/a\u003e). \n\n### Data Flow:\n**1.** **TradingView alert** is set off creating a JSON message containing ticker parameters such as open and closing price\n\u003cbr /\u003e\n**2.** Using **TradingView webhooks**, a POST request containing the **JSON** message is sent to a REST API (**AWS Lambda** function) \n\u003cbr /\u003e\n**3.** This executes a **Python** script running through the **AWS Chalice Serverless Framework** \n\u003cbr /\u003e\n**4.** The **Python** script then executes a bracket order using the **Alpaca API Paper Trading API** (tested requests live and offline using **Insomnia REST API Client**)\n\n### Demo:\n#### 1. Deploy Chalice REST API using CMD\n\u003cimg src=\"https://user-images.githubusercontent.com/66835262/89742956-abb04300-da6c-11ea-949a-99d3a8325219.png\" width=\"800px\"\u003e\n\n\u003cbr /\u003e\n\n#### 2. Set up alerts using Trading View and set Webhook URL to Chalice REST API URL\n\u003cimg src=\"https://user-images.githubusercontent.com/66835262/89742871-bc13ee00-da6b-11ea-9d8c-ee2e4bcfa645.png\" width=\"800px\"\u003e\n\n\u003cbr /\u003e\n\n#### 3. Wait till alarm is triggered and orders are placed through Alpaca\n\u003cimg src=\"https://user-images.githubusercontent.com/66835262/89742880-d948bc80-da6b-11ea-90c3-58d0c3d9cfc7.png\" width=\"800px\"\u003e\n\n### Libraries and Frameworks Used: \n* **TradingView webhooks:** https://www.tradingview.com/support/solutions/43000529348-i-want-to-know-more-about-webhooks/\n* **AWS Chalice Framework for Serverless Python:** https://github.com/aws/chalice\n* **Alpaca API:** https://alpaca.markets/docs/api-documentation/api-v2/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmousazourob%2Fpytrader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmousazourob%2Fpytrader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmousazourob%2Fpytrader/lists"}