⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛
⬛⬛🟥⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛
⬛⬛🟥🟥🟥🟩⬛🟩⬛⬛⬛⬛⬛⬛
⬛🟩🟥🟥🟥🟩⬛🟩⬛⬛⬛⬛⬛⬛
⬛🟩🟥🟥🟥🟩⬛🟩🟥🟩⬛⬛⬛⬛
⬛🟩🟥🟥🟥🟩🟥🟩🟥🟩🟩🟩⬛⬛
⬛⬛⬛🟥🟥🟩🟥🟩🟥🟩🟩🟩🟩⬛
⬛⬛⬛⬛🟥⬛🟥⬛🟥🟩🟩⬛⬛⬛
⬛⬛⬛⬛🟥⬛🟥⬛🟥🟩🟩⬛⬛⬛
⬛⬛⬛⬛🟥⬛🟥⬛🟥🟩🟩⬛⬛⬛
⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
͏
ro-soku (meaning "candle"🕯️ in Japanese) allows you to easily retrieve OHLCV (Kline) data from various cryptocurrency exchanges.
Features:
- No config, No set up, No API key
- Retrieve data exceeding the
limitin a single execution if needed ro-soku guideto interactively build commands to retrieve the data you want- Flexible OHLCV data processing and output formats
| Exchange | Support Status | Notes |
|---|---|---|
| Binance | ✅ | |
| bitbank | ✅ | |
| BitMEX | ✅ | |
| Bybit | ✅ | Inverse type is not supported. |
| Kraken | ❌ | API has some strange bugs; implementation was done but release was abandoned. (see: https://bit.ly/3NNVZOD) |
| OKX | ✅ |
brew tap mirumirumi/ro-soku
brew install ro-sokuupdate / uninstall
# Update:
brew upgrade ro-soku
# Uninstall:
brew uninstall ro-sokuwget https://raw.githubusercontent.com/mirumirumi/ro-soku/main/scripts/install.sh -P /tmp/
sh /tmp/install.shupdate / uninstall
# Update is the same as install
# Uninstall:
rm -f /usr/local/bin/ro-sokuInvoke-WebRequest -Uri "https://raw.githubusercontent.com/mirumirumi/ro-soku/main/scripts/install.ps1" -OutFile "$env:TEMP\install.ps1"
Set-ExecutionPolicy Bypass -Scope Process -Force; & "$env:TEMP\install.ps1"update / uninstall
# Update is the same as install
# Uninstall:
Remove-Item -Recurse -Force "$env:USERPROFILE\AppData\Local\ro-soku"ro-soku \
--exchange binance \
--type spot \
--symbol BTC/USDT \
--interval 1sec \
--term-start 2023-05-10T13:25:33Z \
--term-end 1683725270000Or, when you always want to obtain the most recent data, such as "past 30 minutes":
ro-soku \
--exchange binance \
--type perpetual \
--symbol BTC/USDT \
--interval 1min \
--past \
--range 30minOutput for csv file to analysis close prices:
ro-soku \
--past \
--range 1hour \
--pick t,c \
--format csv \
> data.csvGuide to build a command:
ro-soku guideNote It can also be executed without arguments (
ro-soku), but this is not very useful since all options are executed in their default state.
Refer to ro-soku --help for all options, available values, and other details.
# All of the following are valid
--term-start 2023-05-08T13:25:33+00:00
--term-start 2023-05-08T13:25:33+09:00
--term-start 2023-05-08T13:25:33Z
--term-start 1683725270000 # Unixtime (milliseconds)# default
--pick t,o,h,l,c,v
# outputs:
[1614984720000, 49225.0, 49254.0, 49225.0, 49240.0, 912082.0981]
# only high and low
--pick t,h,l
# outputs:
[1614984720000, 49254.0, 49225.0]
# allow duplicate selection
--pick v,v,v,t
# outputs:
[912082.0981, 912082.0981, 912082.0981, 1614984720000][1614984720000, 49225.0, 49254.0, 49225.0, 49240.0, 912082.0981]
[1614984780000, 49240.0, 49240.0, 49219.0, 49222.0, 427743.0204]
[1614984840000, 49222.0, 49229.0, 49221.0, 49229.0, 97785.225]
...
1614984720000,49225.0,49254.0,49225.0,49240.0,912082.0981
1614984780000,49240.0,49240.0,49219.0,49222.0,427743.0204
1614984840000,49222.0,49229.0,49221.0,49229.0,97785.225
...1614984720000 49225.0 49254.0 49225.0 49240.0 912082.0981
1614984780000 49240.0 49240.0 49219.0 49222.0 427743.0204
1614984840000 49222.0 49229.0 49221.0 49229.0 97785.225
...MIT
[ { "unixtime": 1614984720000, "open": 49225.0, "high": 49254.0, "low": 49225.0, "close": 49240.0, "volume": 912082.0981 }, { "unixtime": 1614984780000, "open": 49240.0, "high": 49240.0, "low": 49219.0, "close": 49222.0, "volume": 427743.0204 }, { "unixtime": 1614984840000, "open": 49222.0, "high": 49229.0, "low": 49221.0, "close": 49229.0, "volume": 97785.225 } // ... ]