We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
download.py
import datetime from binance_historical_data import BinanceDataDumper data_dumper = BinanceDataDumper( path_dir_where_to_dump=".", asset_class="spot", # spot, um, cm data_type="klines", # aggTrades, klines, trades data_frequency="1h", ) data_dumper.dump_data( tickers="BTCUSDT", date_start=datetime.date(2023, 7, 1), date_end=None, is_to_update_existing=False, )
store.py
from influxdb_client import InfluxDBClient, WriteOptions import datetime import pandas as pd data_source = "binance" asset_class = "spot" # spot, um, cm storage_frequency = "daily" # daily, monthly data_type = "klines" # aggTrades, klines, trades symbol = "BTCUSDT" data_frequency = "1h" dt = datetime.date(2023, 7, 1) fname = f"C:\\Users\\w4c\\data\\{data_source}\\{asset_class}\\{storage_frequency}\\{data_type}\\{symbol}\\{data_frequency}\\{symbol}-{data_frequency}-{dt.year}-{dt.month:02}-{dt.day:02}.csv" with InfluxDBClient.from_env_properties() as client: columns = [ "OpenTime", "Open", "High", "Low", "Close", "Volume", "CloseTime", "Quote asset volume", "Number of trades", "Taker buy base asset volume", "Taker buy quote asset volume", "Ignore", ] for df in pd.read_csv(fname, chunksize=1_000, names=columns): # for col in ["OpenTime", "CloseTime"]: for col in ["OpenTime"]: df[col] = pd.to_datetime(df[col], unit="ms") df["CloseTime"] *= 1_000_000 df["data_source"] = data_source df["asset_class"] = asset_class df["data_type"] = data_type df["data_frequency"] = data_frequency df["symbol"] = symbol print(df) print(df.dtypes) with client.write_api() as write_api: try: write_api.write( record=df, bucket="data", data_frame_measurement_name="crypto", data_frame_tag_columns=["data_source", "asset_class", "data_type", "symbol", "data_frequency"], data_frame_timestamp_column="OpenTime", ) except Exception as e: print(e)
Open column is not displayed
No response
The text was updated successfully, but these errors were encountered:
bednar
No branches or pull requests
Specifications
Code sample to reproduce problem
download.py
store.py
Open column is not displayed
Additional info
No response
The text was updated successfully, but these errors were encountered: