trader
This commit is contained in:
11
Niki/trader/test-NNFX/dealer.py
Normal file
11
Niki/trader/test-NNFX/dealer.py
Normal file
@ -0,0 +1,11 @@
|
||||
import ccxt
|
||||
import pandas as pd
|
||||
exchange = ccxt.coinbase()
|
||||
symbol = 'BTC/USDT'
|
||||
timeframe = '1m'
|
||||
ohlcv = exchange.fetch_ohlcv(symbol, timeframe)
|
||||
df = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
|
||||
df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms')
|
||||
df.set_index('timestamp', inplace=True)
|
||||
# print(df.head())
|
||||
print(df)
|
Reference in New Issue
Block a user