{"id":42136462,"url":"https://github.com/chr1gu/mk42-binance-backtesting","last_synced_at":"2026-01-26T16:14:02.803Z","repository":{"id":144629295,"uuid":"558041519","full_name":"chr1gu/mk42-binance-backtesting","owner":"chr1gu","description":"Easily download Binance Public Data 💪","archived":false,"fork":false,"pushed_at":"2023-12-27T20:11:17.000Z","size":159,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-26T10:09:52.226Z","etag":null,"topics":["backtesting","binance","crypto","cryptocurrency","historical-data","klines","market-data","ohlc","trading"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chr1gu.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}},"created_at":"2022-10-26T19:37:00.000Z","updated_at":"2023-09-08T16:36:23.000Z","dependencies_parsed_at":"2024-01-14T12:18:21.723Z","dependency_job_id":"0a9aae48-b79f-4fab-a267-6bc7dd34fc64","html_url":"https://github.com/chr1gu/mk42-binance-backtesting","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":"0.19444444444444442","last_synced_commit":"d85bdd961ba22af875c7ae8a02a4e3353e6636cf"},"previous_names":["chr1gu/mk42-binance-backtesting"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/chr1gu/mk42-binance-backtesting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr1gu%2Fmk42-binance-backtesting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr1gu%2Fmk42-binance-backtesting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr1gu%2Fmk42-binance-backtesting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr1gu%2Fmk42-binance-backtesting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chr1gu","download_url":"https://codeload.github.com/chr1gu/mk42-binance-backtesting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr1gu%2Fmk42-binance-backtesting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28782164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"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":["backtesting","binance","crypto","cryptocurrency","historical-data","klines","market-data","ohlc","trading"],"created_at":"2026-01-26T16:14:02.225Z","updated_at":"2026-01-26T16:14:02.796Z","avatar_url":"https://github.com/chr1gu.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MK42 Binance Backtesting Tools\n\n## Fetch: download Binance public data\n\nUse `mk42-binance-backtesting fetch` to easily download [Binance public data](https://github.com/binance/binance-public-data) 💪\n\n## Getting started\n\n1. Install and build `mk42-binance-backtesting` from source:\n\n```\ncargo install --git https://github.com/chr1gu/mk42-binance-backtesting\n```\n\n2. Example usage:\n\n```\nmk42-binance-backtesting fetch --symbol ^BTC --interval 1m ./data\n```\n\n# Visualize\n\n## Grafana\n\ndocker run --rm -it -p 3000:3000 --name=grafana \\\n --user \"$(id -u)\" \\\n -v \"$PWD/grafana/data:/var/lib/grafana\" \\\n -v \"$PWD/data:/data\" \\\n grafana/grafana-oss\n\n\u003e Open http://localhost:3000/\n\u003e admin / admin\n\n## InfluxDB\n\ndocker run --rm -it -p 8083:8083 -p 8086:8086 \\\n --user \"$(id -u)\" \\\n -v \"$PWD/influxdb/data:/var/lib/influxdb2\" \\\n influxdb\n\n\u003e Open http://localhost:8086/\n\u003e admin / admin123\n\n## Development\n\n- Update toolchain: [Install Rust](https://www.rust-lang.org/tools/install) or update your installation with `rustup update`.\n- Build and fetch data: `cargo r --release -- fetch --start-date 2021-03-01 --end-date 2022-01-01 --symbol USDT$ --interval 1m ./data`\n- Build and test with data: `cargo r --release -- test --start-date 2021-03-01 --end-date 2022-01-01 --symbol \"BTCUSDT|XRPUSDT\" ./data --verbose`\n- Build and test with multiple variants: `cargo r --release -- test-variants --start-date 2021-01-01 --end-date 2022-01-01 --symbol USDT$ ./data`\n\n### Linting\n\nRun `cargo clippy` or `cargo clippy --fix --bin \"mk42-binance-backtesting\"` to find and fix obvious issues.\n\n### New release\n\n```\ngit tag -a v0.0.1\ngit push --tags\n```\n\n# Performance\n\n## Highscores\n\n`cargo r --release -- test-variants --start-date 2021-01-01 --end-date 2022-01-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2021-01-01 to 2022-01-01 with 365 variations: 3069%\n\u003e Finished after 3221.323858917s\n\n`cargo r --release -- test-variants --start-date 2022-01-01 --end-date 2023-01-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2022-01-01 to 2023-01-01 with 365 variations: -2758%\n\u003e Finished after 3912.586872958s\n\n## Difficult scenarios\n\n`cargo r --release -- test-variants --start-date 2021-05-01 --end-date 2021-06-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2021-05-01 to 2021-06-01 with 31 variations: -5553%\n\n`cargo r --release -- test-variants --start-date 2021-06-01 --end-date 2021-07-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2021-06-01 to 2021-07-01 with 30 variations: -3525%\n\n`cargo r --release -- test-variants --start-date 2021-09-01 --end-date 2021-10-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2021-09-01 to 2021-10-01 with 30 variations: -1689%\n\n`cargo r --release -- test-variants --start-date 2021-11-01 --end-date 2021-12-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2021-11-01 to 2021-12-01 with 30 variations: -739%\n\n`cargo r --release -- test-variants --start-date 2021-01-01 --end-date 2022-01-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2021-01-01 to 2022-01-01 with 365 variations: -1465%\n\u003e Finished after 3897.686776459s\n\n`cargo r --release -- test-variants --start-date 2023-04-01 --end-date 2023-06-01 --symbol USDT$ ./data`\n\n\u003e Average performance from 2023-04-01 to 2023-06-01 with 61 variations: -1494%\n\u003e Performance from 2023-04-01 to 2023-06-01: -2526%, trades: 885\n\u003e Finished after 52.31117825s\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr1gu%2Fmk42-binance-backtesting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchr1gu%2Fmk42-binance-backtesting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr1gu%2Fmk42-binance-backtesting/lists"}