{"id":20773023,"url":"https://github.com/tnar/coincheck-rust","last_synced_at":"2025-03-11T20:47:24.227Z","repository":{"id":241015998,"uuid":"778989122","full_name":"tnar/coincheck-rust","owner":"tnar","description":"A high-frequency algorithmic trading bot for Coincheck, a major Japanese cryptocurrency exchange. Built with Rust, this project leverages asynchronous programming and WebSockets to handle real-time data for efficient trading operations.","archived":false,"fork":false,"pushed_at":"2024-09-18T00:51:41.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T07:30:51.123Z","etag":null,"topics":["coincheck","rust","tokio"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/tnar.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,"publiccode":null,"codemeta":null}},"created_at":"2024-03-28T20:13:51.000Z","updated_at":"2024-09-18T00:52:42.000Z","dependencies_parsed_at":"2024-11-18T00:21:25.819Z","dependency_job_id":null,"html_url":"https://github.com/tnar/coincheck-rust","commit_stats":null,"previous_names":["tnar/coincheck-rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnar%2Fcoincheck-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnar%2Fcoincheck-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnar%2Fcoincheck-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnar%2Fcoincheck-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tnar","download_url":"https://codeload.github.com/tnar/coincheck-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243112187,"owners_count":20238180,"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":["coincheck","rust","tokio"],"created_at":"2024-11-17T12:23:57.944Z","updated_at":"2025-03-11T20:47:24.198Z","avatar_url":"https://github.com/tnar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coincheck Rust\n\nA high-frequency algorithmic trading bot for [Coincheck](https://coincheck.com/), a major Japanese cryptocurrency exchange. Built with Rust, this project leverages asynchronous programming and WebSockets to handle real-time data for efficient trading operations.\n\n## Features\n\n- **Real-Time Data Handling:** Connects to Coincheck's WebSocket API to receive live order book and trade updates.\n- **Automated Trading:** Automatically places buy and sell orders based on the best bid and ask prices.\n- **Order Management:** Manages active orders, updates balances, and handles order executions.\n- **Graceful Shutdown:** Listens for termination signals to cancel active orders and safely exit.\n- **Configurable Parameters:** Easily adjust trading parameters such as order size and price increments.\n\n## Installation\n\n### Prerequisites\n\n- [Rust](https://www.rust-lang.org/tools/install) (latest stable version)\n- [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) (comes with Rust)\n\n### Clone the Repository\n\n```sh\ngit clone https://github.com/yourusername/coincheck-rust.git\ncd coincheck-rust\n```\n\n### Set Up Environment Variables\n\nCreate a `.env` file in the root directory and add your Coincheck API credentials:\n\n```env\nAPI_KEY=your_coincheck_api_key\nSECRET_KEY=your_coincheck_secret_key\n```\n\n### Build and Run\n\nYou can run the application using Cargo:\n\n```sh\nRUST_LOG=debug,rustls=off,reqwest=off cargo run\n```\n\n## Configuration\n\nThe trading parameters can be configured in the `Config` struct found in `src/config.rs`. The default parameters are set as follows:\n\n- **Symbol:** `btc_jpy`\n- **Size:** `0.02`\n- **Max Size:** `1.0`\n- **Price Increment:** `0.00000001`\n\nModify these values as needed to suit your trading strategy.\n\n## Usage\n\nOnce the application is running, it will:\n\n1. Connect to Coincheck's WebSocket API.\n2. Subscribe to the order book and trade channels for the specified symbol.\n3. Continuously monitor market data to place and manage buy/sell orders.\n4. Handle order executions and update balances accordingly.\n5. Listen for termination signals (e.g., SIGINT, SIGTERM) to cancel active orders and exit gracefully.\n\n## Logging\n\nThe application uses the `env_logger` crate for logging. The log level can be adjusted via the `RUST_LOG` environment variable. For example:\n\n```sh\nRUST_LOG=info cargo run\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n### Guidelines\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Commit your changes with clear messages.\n4. Submit a pull request detailing your changes.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Acknowledgements\n\n- [Tokio](https://tokio.rs/) for asynchronous runtime.\n- [Reqwest](https://reqwest.rs/) for HTTP requests.\n- [Serde](https://serde.rs/) for serialization/deserialization.\n- [Coincheck](https://coincheck.com/) for providing the API.\n# End of Selection\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnar%2Fcoincheck-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftnar%2Fcoincheck-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnar%2Fcoincheck-rust/lists"}