Last active
December 9, 2021 12:19
-
-
Save juanpabloaj/8fbfb3398ead388f7f8c14e71e58a50e to your computer and use it in GitHub Desktop.
OHLC BTC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install ohlc; apt install jq | |
# with other token, ohlcbtc ETHUSDT | |
ohlcbtc () { | |
token=${1:-BTCUSDT} | |
while true; | |
do | |
ohlc --pab --ha -n <( curl "https://api.binance.com/api/v3/klines?symbol=${token}&interval=1h" 2>/dev/null | jq -r '.[][1:5]|join(" ")' ) | |
sleep 3600 | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment