{"id":15132561,"url":"https://github.com/ayush272002/exchange","last_synced_at":"2026-02-14T14:31:29.362Z","repository":{"id":255500601,"uuid":"850473822","full_name":"Ayush272002/Exchange","owner":"Ayush272002","description":"Cryptocurrency exchange platform designed to handle high-frequency trading and real-time market interactions.","archived":false,"fork":false,"pushed_at":"2024-09-08T12:22:36.000Z","size":42868,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T21:44:53.968Z","etag":null,"topics":["expressjs","monorepo","nextjs","postgresql","pubsub","redis","turborepo","websocket"],"latest_commit_sha":null,"homepage":"https://exchange-ayush.vercel.app","language":"TypeScript","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/Ayush272002.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}},"created_at":"2024-08-31T21:45:05.000Z","updated_at":"2024-09-08T12:22:39.000Z","dependencies_parsed_at":"2024-09-08T13:59:15.827Z","dependency_job_id":null,"html_url":"https://github.com/Ayush272002/Exchange","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"cf02c9fad6157074c10433ad34da6f2c9f06ad59"},"previous_names":["ayush272002/exchange"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FExchange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FExchange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FExchange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush272002%2FExchange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayush272002","download_url":"https://codeload.github.com/Ayush272002/Exchange/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406071,"owners_count":20933802,"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","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":["expressjs","monorepo","nextjs","postgresql","pubsub","redis","turborepo","websocket"],"created_at":"2024-09-26T04:20:52.951Z","updated_at":"2026-02-14T14:31:29.335Z","avatar_url":"https://github.com/Ayush272002.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exchange\n\nThis project is a fully-featured cryptocurrency exchange platform designed to handle high-frequency trading and real-time market interactions. It includes an API server for user requests, a memory-based engine for order book management and balance tracking, and a WebSocket server for live updates. The platform integrates a DB Processor for persistent data storage, a frontend built with Next.js, and a Market Maker for liquidity. Redis is used for queuing and pub/sub messaging, while TimescaleDB handles time-series data for advanced kline charting. Together, these components create a robust, scalable trading environment for both developers and users.\n\n## Tech Stack\n- Typescript\n- Monorepo/ Turborepo\n- Next.js \n- Expressjs\n- Redis\n- Redis Pub Subs\n- Websockets\n- Timescale Db\n- Docker\n- CI/CD\n- Husky\n\n## Architecture\n\n![workflow](images/workflow.png)\n\n1. \u003cspan style=\"color: lightgreen;\"\u003eAPI - An API Server the user sends HTTP requests to\u003c/span\u003e\n2. \u003cspan style=\"color: red;\"\u003eEngine - Runs various market orderbooks, stores user balances in memory\u003c/span\u003e\n3. \u003cspan style=\"color: #9B59B6;\"\u003eWebsocket - Websocket server that user subscribes to real time events from\u003c/span\u003e\n4. \u003cspan style=\"color: orange;\"\u003eDB Processor - Processes messages from the `Engine` and persists them in the DB\u003c/span\u003e\n5. Frontend - NextJS app (same as last week, only the URLs would change)\n6. Market maker (mm) - Places random orders to keep the book liquid\n7. Redis - Queue and pub sub\n8. TimescaleDB - Creates buckets of klines based on price feed\n\n## Preview\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/preview.gif\" /\u003e\n\u003c/p\u003e\n\n## Running the project locally\n\nThere is a [docker-compose.yml](./docker-compose.yml) in each of the services fill in the environment variables after that in the project's root dir run\n\n```shell\ngit clone https://github.com/Ayush272002/Exchange.git\ncd Exchange\ndocker-compose up\n```\n\n## Contributing\n\nContributions are welcome! If you have suggestions for new features, bug fixes, or improvements, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nIf you have any questions or suggestions, please feel free to contact.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush272002%2Fexchange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayush272002%2Fexchange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush272002%2Fexchange/lists"}