{"id":19310969,"url":"https://github.com/a0s/tinkoff-invest-dumper","last_synced_at":"2025-04-22T14:30:23.092Z","repository":{"id":146415537,"uuid":"289361756","full_name":"a0s/tinkoff-invest-dumper","owner":"a0s","description":"Saves orderbook/candles streams to JSON-file for ML purposes","archived":false,"fork":false,"pushed_at":"2023-04-07T20:47:04.000Z","size":60,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T06:37:53.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/a0s.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":"2020-08-21T20:46:07.000Z","updated_at":"2023-04-07T20:47:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"9273c9f6-082a-43be-9b3f-bb5c99fbfe3e","html_url":"https://github.com/a0s/tinkoff-invest-dumper","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ftinkoff-invest-dumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ftinkoff-invest-dumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ftinkoff-invest-dumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ftinkoff-invest-dumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a0s","download_url":"https://codeload.github.com/a0s/tinkoff-invest-dumper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250258728,"owners_count":21400959,"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":[],"created_at":"2024-11-10T00:27:09.059Z","updated_at":"2025-04-22T14:30:23.086Z","avatar_url":"https://github.com/a0s.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e abandoned repository, code is not working\n\nStreaming Data Saver\n====================\n[![GitHub release](https://img.shields.io/github/release/a0s/tinkoff-invest-dumper.svg)](https://github.com/a0s/tinkoff-invest-dumper/releases/latest)\n[![Binary release](https://github.com/a0s/tinkoff-invest-dumper/workflows/Binary%20release/badge.svg)](https://github.com/a0s/tinkoff-invest-dumper/releases/latest)\n[![Docker image](https://github.com/a0s/tinkoff-invest-dumper/workflows/Docker%20image/badge.svg)](https://hub.docker.com/repository/docker/a00s/tinkoff-invest-dumper)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\nWorking with [Tinkoff Invest OpenAPI](https://github.com/TinkoffCreditSystems/invest-openapi). Dumps realtime streams of orderbooks and candles to JSON file for ML purposes.\n\nReleases\n--------\n\n* statically-linked binary for: [linux/amd64](https://github.com/a0s/tinkoff-invest-dumper/releases/latest/download/tinkoff-invest-dumper-amd64.tar.gz), [linux/arm64](https://github.com/a0s/tinkoff-invest-dumper/releases/latest/download/tinkoff-invest-dumper-arm64.tar.gz), [linux/armv6](https://github.com/a0s/tinkoff-invest-dumper/releases/latest/download/tinkoff-invest-dumper-armv6.tar.gz), [linux/armv7](https://github.com/a0s/tinkoff-invest-dumper/releases/latest/download/tinkoff-invest-dumper-armv7.tar.gz)\n\n* docker image with amd64, arm64, armv6 and armv7 manifests: [a00s/tinkoff-invest-dumper](https://hub.docker.com/repository/docker/a00s/tinkoff-invest-dumper)\n\nOptions\n-------\n\n```shell script\ntinkoff-invest-dumper --help\n  --candle string\n        list of tickers to subscribe for candles\n  --candle-interval string\n        interval of candles: 1min,2min,3min,5min,10min,15min,30min,hour,2hour,4hour,day,week,month (default \"1min\")\n  --orderbook string\n        list of tickers to subscribe for orderbooks\n  --orderbook-depth int\n        depth of orderbook: from 1 to 20 (default 20)\n  --path string\n        path to storage dir (default \".\")\n  --time-suffix-enabled\n        add the time suffix to every filename on (re)start\n  --time-suffix-format string\n        go format of the time suffix (see https://golang.org/src/time/format.go) (default \"2006010215\")\n  --token string\n        your sandbox's token\n  --version\n        show version info\n```\n\nFile rotation\n-------------\n\nYou can split and rotate JSON-files using `--time-suffix-enabled`. For e.g, if you start `tinkoff-invest-dumper` as `systemd` service,  you may use `cron` to restart this service at a certain time during an inactive part of a trading day. During restarting, `tinkoff-invest-dumper` closes previous files and opens a new one with a new-day time suffix. The inactive period for Tinkoff Invest is `2:00-10:30 MSK`.\n\n      \nRun as Docker image\n-------------------\n\n```shell script\ndocker run \\\n  --rm -it \\\n  --env TOKEN=$TINKOFF_SANDBOX \\\n  --volume `pwd`/data:/data \\\n  a00s/tinkoff-invest-dumper \\\n    --token \"$TOKEN\" \\\n    --path /data \\\n    --time-suffix-enabled \\\n    --candle NVDA,MSFT,TSLA \\\n    --orderbook NVDA,MSFT,TSLA\n```\n\nExample\n-------\n\n```shell script\ntinkoff-invest-dumper \\\n    --token \"$TINKOFF_SANDBOX\" \\\n    --candle NVDA,MSFT,TSLA \\\n    --orderbook NVDA,MSFT,TSLA \\\n    --orderbook-depth 2\n```\n\n```\n2020/08/24 12:49:15 Subscribed to orderbook NVDA BBG000BBJQV0\n2020/08/24 12:49:15 Subscribed to orderbook MSFT BBG000BPH459\n2020/08/24 12:49:15 Subscribed to orderbook TSLA BBG000N9MNX3\n2020/08/24 12:49:15 Subscribed to candles NVDA BBG000BBJQV0\n2020/08/24 12:49:15 Subscribed to candles MSFT BBG000BPH459\n2020/08/24 12:49:15 Subscribed to candles TSLA BBG000N9MNX3\n```\n\n`tail -f NVDA-obk`\n\n```json\n{\"a\":[[514.31,75],[514.71,6]],\"b\":[[514.3,6],[514.25,10]],\"figi\":\"BBG000BBJQV0\",\"lt\":\"2020-08-24T12:49:24.866749+03:00\",\"t\":\"2020-08-24T09:49:24.850272182Z\",\"ticker\":\"NVDA\"}\n{\"a\":[[514.31,75],[514.71,6]],\"b\":[[514.3,6],[514.25,10]],\"figi\":\"BBG000BBJQV0\",\"lt\":\"2020-08-24T12:49:25.225449+03:00\",\"t\":\"2020-08-24T09:49:25.26326835Z\",\"ticker\":\"NVDA\"}\n{\"a\":[[514.31,75],[514.71,6]],\"b\":[[514.3,6],[514.25,10]],\"figi\":\"BBG000BBJQV0\",\"lt\":\"2020-08-24T12:49:25.480208+03:00\",\"t\":\"2020-08-24T09:49:25.50689026Z\",\"ticker\":\"NVDA\"}\n```\n\n`tail -f NVDA-cdl`\n\n```json\n{\"c\":514.48,\"figi\":\"BBG000BBJQV0\",\"h\":514.71,\"i\":\"1min\",\"l\":514.48,\"lt\":\"2020-08-24T12:49:15.203217+03:00\",\"o\":514.5,\"t\":\"2020-08-24T09:49:15.241791397Z\",\"ticker\":\"NVDA\",\"ts\":\"2020-08-24T09:49:00Z\",\"v\":11}\n{\"c\":514.48,\"figi\":\"BBG000BBJQV0\",\"h\":514.71,\"i\":\"1min\",\"l\":514.48,\"lt\":\"2020-08-24T12:49:19.747036+03:00\",\"o\":514.5,\"t\":\"2020-08-24T09:49:19.786563182Z\",\"ticker\":\"NVDA\",\"ts\":\"2020-08-24T09:49:00Z\",\"v\":13}\n```\n\nLinks\n-----\n\n- https://www.tinkoff.ru/invest/\n- https://github.com/TinkoffCreditSystems/invest-openapi/\n- https://tinkoffcreditsystems.github.io/invest-openapi/\n- https://t.me/tinkoffinvestopenapi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa0s%2Ftinkoff-invest-dumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa0s%2Ftinkoff-invest-dumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa0s%2Ftinkoff-invest-dumper/lists"}