⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛
⬛⬛🟥⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛
⬛⬛🟥🟥🟥🟩⬛🟩⬛⬛⬛⬛⬛⬛
⬛🟩🟥🟥🟥🟩⬛🟩⬛⬛⬛⬛⬛⬛
⬛🟩🟥🟥🟥🟩⬛🟩🟥🟩⬛⬛⬛⬛
⬛🟩🟥🟥🟥🟩🟥🟩🟥🟩🟩🟩⬛⬛
⬛⬛⬛🟥🟥🟩🟥🟩🟥🟩🟩🟩🟩⬛
⬛⬛⬛⬛🟥⬛🟥⬛🟥🟩🟩⬛⬛⬛
⬛⬛⬛⬛🟥⬛🟥⬛🟥🟩🟩⬛⬛⬛
⬛⬛⬛⬛🟥⬛🟥⬛🟥🟩🟩⬛⬛⬛
⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
͏
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
limit
in a single execution if needed ro-soku guide
to 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-soku
update / uninstall
# Update:
brew upgrade ro-soku
# Uninstall:
brew uninstall ro-soku
wget https://raw.githubusercontent.com/mirumirumi/ro-soku/main/scripts/install.sh -P /tmp/
sh /tmp/install.sh
update / uninstall
# Update is the same as install
# Uninstall:
rm -f /usr/local/bin/ro-soku
Invoke-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 1683725270000
Or, 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 30min
Output for csv file to analysis close prices:
ro-soku \
--past \
--range 1hour \
--pick t,c \
--format csv \
> data.csv
Guide to build a command:
ro-soku guide
Note 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
...
[
{
"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
}
// ...
]
MIT