{"id":15011440,"url":"https://github.com/ocignis/ocignis-bot","last_synced_at":"2025-08-10T11:07:04.989Z","repository":{"id":142916408,"uuid":"603897919","full_name":"ocignis/ocignis-bot","owner":"ocignis","description":"Binance minimal trading bot with API to easily run and schedule trading strategies. Build algorithms in Typescript with focus on best practices and painless developer experience.","archived":false,"fork":false,"pushed_at":"2024-05-26T20:57:11.000Z","size":1412,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T10:48:37.762Z","etag":null,"topics":["binance","binance-bot","bunjs","hft","hft-trading","nodejs","trading-algorithms","trading-bot","trading-strategies","typescript"],"latest_commit_sha":null,"homepage":"","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/ocignis.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":"2023-02-19T21:57:56.000Z","updated_at":"2025-02-01T15:54:30.000Z","dependencies_parsed_at":"2024-09-24T19:51:47.310Z","dependency_job_id":null,"html_url":"https://github.com/ocignis/ocignis-bot","commit_stats":{"total_commits":127,"total_committers":1,"mean_commits":127.0,"dds":0.0,"last_synced_commit":"85a05e4074476f1af544bbcbbf4ceb8b5216cd4f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ocignis/ocignis-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocignis%2Focignis-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocignis%2Focignis-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocignis%2Focignis-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocignis%2Focignis-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocignis","download_url":"https://codeload.github.com/ocignis/ocignis-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocignis%2Focignis-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269713884,"owners_count":24463244,"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-08-10T02:00:08.965Z","response_time":71,"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":["binance","binance-bot","bunjs","hft","hft-trading","nodejs","trading-algorithms","trading-bot","trading-strategies","typescript"],"created_at":"2024-09-24T19:41:06.204Z","updated_at":"2025-08-10T11:07:04.967Z","avatar_url":"https://github.com/ocignis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ocignis Bot\n\n[![CI][ci-badge]][ci-url]\n[![CI-Deployment][ci-deployment-badge]][ci-deployment-url]\n\nBinance minimal trading bot with API to easily run, stop or schedule trading strategies.  \nBuild algorithms in Typescript with focus on best practices and painless developer experience.\n\n## Features:\n\n- Minimal setup that can be extended 🔧\n- Spin it up with single command 🌀\n- Can be easily modified to work with any exchange or trading asset (currently setup to Binance)\n- Dockerized:\n  - Instantly create multiple bot containers with different strategies parameters ⚡\n  - Nodejs v18 Alpine multi-stage image build ~120 MB (created on every GitHub Release)\n- End-To-End type safety with TypeScript (Database \u003c-\u003e Bot \u003c-\u003e API \u003c-\u003e Frontend) - Always execute your trading strategies safe ✅\n- tRPC API for seamless [frontend app](https://github.com/ocignis/ocignis-fe) integration\n- Optional Express.js REST API\n- Websocket implementation. Get every single trade in real time.\n- Implemented with Binance integration, but extendable for any crypto or stock exchange\n\n## Requirements\n\n- [Node v18+](https://nodejs.org/)\n- [Docker](https://www.docker.com/)\n\n## Running\n\n_Easily set up a local development environment with single command!_\n\n### Bot:\n\n- clone the repo\n- rename [file to _dev.env_](https://github.com/ocignis/ocignis-bot/blob/main/envs/dev.example.env) and set env vars(create [Binance API keys](https://www.binance.com/en/support/faq/how-to-create-api-keys-on-binance-360002502072))\n- `npm run dev` 🚀 _(apply database migrations if needed `npm run db-migration-generate`)_\n\nRun [Ocignis React app](https://github.com/ocignis/ocignis-fe) to start, stop or schedule trading strategies.\n\n### Backtesting:\n\n- download market data (trades, klines, aggregates etc.) [from Binance](https://data.binance.vision/) `npm run backtest-download-data`\n- seed database `npm run backtest-seed-database`\n- `npm run backtest-run` 🚀\n\nRun backtest in:\n\n- terminal `npm run backtest-run`:\n\n[![](misc/demo-terminal.gif)](https://github.com/ocignis/ocignis-bot)\n\n- or run [Ocignis React app](https://github.com/ocignis/ocignis-fe) in browser:\n\nhttps://user-images.githubusercontent.com/3073826/225337569-9dc165e9-d5e8-4e36-95cd-23ad7facc34b.mp4\n\n## Stack:\n\n- [TypeScript v5](https://github.com/microsoft/TypeScript) codebase with [Strict Configuration](https://typescript-eslint.io/docs/linting/configs#strict)\n- [tRPC v10](https://trpc.io/) API for client integration.\n- [Prisma v4](https://www.prisma.io/) ORM\n- Unit and integration tests with [Jest](https://github.com/facebook/jest)\n- Linting with [ESLint](https://eslint.org/)\n- [Prettier](https://prettier.io/) code formatter\n- Git hooks with [Husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged)\n- Commit messages must meet [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) format.  \n  After staging changes just run `npm run commit` and get instant feedback on your commit message formatting and be prompted for required fields by [Commitizen](https://github.com/commitizen/cz-cli)\n\n## Commands\n\n| Command                         | Description                                                                  |\n| ------------------------------- | ---------------------------------------------------------------------------- |\n| prepare                         | Setup git hooks with Husky (executes on npm install)                         |\n| build-ocignis-shared            | Build and export tRPC types                                                  |\n| dev                             | Start bot and database                                                       |\n| dev-changed-deps                | Build and start bot image                                                    |\n| build                           | Build bot                                                                    |\n| lint                            | Lint whole repository                                                        |\n| lint-fix                        | Run lint fix                                                                 |\n| lint-staged-husky               | Run prettier and lint on staged files                                        |\n| tsc                             | Run TypeScript compiler                                                      |\n| test                            | Run tests                                                                    |\n| test-watch                      | Run tests in watch mode                                                      |\n| format-lint                     | Lint formatting with Prettier                                                |\n| format-fix                      | Fix formatting with Prettier                                                 |\n| commit                          | Run Commitizen on staged file                                                |\n| clean                           | Remove installed, generated and cached folders (node_modules, coverage etc.) |\n| backtest-download-data          | Download binance csv data files                                              |\n| backtest-seed-database          | Seed database for backtesting                                                |\n| backtest-run                    | Run backtest                                                                 |\n| db-prisma-client-generate       | Generate Prisma client                                                       |\n| db-migration-generate           | Generate migration                                                           |\n| db-migration-run                | Run migration helper                                                         |\n| db-migration-run-dev            | Run migration localy on dev                                                  |\n| db-migration-run-prod           | Run migration on production                                                  |\n| docker-dev                      | Start bot localy on dev                                                      |\n| docker-prod                     | Start bot in production                                                      |\n| docker-compose-run              | Start bot and database in docker containers                                  |\n| docker-compose-run-changed-deps | Build bot image and start                                                    |\n\n\u003c!-- Badges --\u003e\n\n[ci-badge]: https://github.com/ocignis/ocignis-bot/actions/workflows/CI.yml/badge.svg\n[ci-url]: https://github.com/ocignis/ocignis-bot/actions/workflows/CI.yml\n[ci-deployment-badge]: https://github.com/ocignis/ocignis-bot/actions/workflows/CI-Deployment.yml/badge.svg\n[ci-deployment-url]: https://github.com/ocignis/ocignis-bot/actions/workflows/CI-Deployment.yml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focignis%2Focignis-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focignis%2Focignis-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focignis%2Focignis-bot/lists"}