For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Cryptowatch Data Feed
-
Hello,
I'd like to use crypto data feeds, but I don't really know where can I get them. I don't mind using CSVs. I have found some sources but I don't know what to do with it. Anyone knows how to use/install these?
https://github.com/cryptowatch/cw-sdk-python
https://docs.cryptowat.ch/rest-api/ -
example:
import time import cryptowatch as cw cw.api_key = "your public key" # Return market candlestick info (open, high, low, close, volume) on some timeframes list = cw.markets.get("BINANCE:BTCUSDT", ohlc=True, periods=["15m"]) print(list) print(len(list.of_15m)) it = iter(list.of_15m) for i in it: i[0] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(i[0])) print(i)
['2020-11-04 21:30:00', 13803.38, 13860.0, 13786.87, 13834.74, 728.051491, 10066510.70990301] ['2020-11-04 21:45:00', 13834.73, 13895.0, 13823.83, 13858.36, 880.441081, 12210240.06888313] ['2020-11-04 22:00:00', 13858.36, 13885.0, 13832.5, 13835.13, 631.065418, 8745946.00082795]
-
https://github.com/cryptowatch/cw-sdk-python
It is very clear here, you can copy the code to familiarize yourself with the usage -
oh, thankyou!