-
Notifications
You must be signed in to change notification settings - Fork 11
Here is the code-
from cryptodatapy.util.datacatalog import DataCatalog
dc = DataCatalog()
fields = dc.get_fields_metadata()
fields = list(fields.index)
import DataRequest
from cryptodatapy.extract.datarequest import DataRequest
specify parameters for data request: tickers, fields, start date, end_date, etc.
data_req = DataRequest(
source='coinmetrics', # name of data source
tickers=['btc'], # list of asset tickers, in CryptoDataPy format, defaults to 'btc'
fields=fields, # list of fields, in CryptoDataPy, defaults to 'close'
freq='d', # data frequency, defaults to daily
quote_ccy=None, # defaults to USD/USDT
exch='Binance', # defaults to exchange weighted average or Binance
mkt_type= 'spot', # defaults to spot
start_date='2021-10-12', # defaults to start date for longest series
end_date='2023-12-19', # defaults to most recent
tz=None, # defaults to UTC time
cat=None, # optional, should be specified when asset class is not crypto, eg. 'fx', 'rates', 'macro', etc.
)
The dataset shows some of the columns and some of them aren't displayed. Do I need to make changes to the parameter values?
Here are the columns that does get extracted-
Index(['open', 'high', 'low', 'close', 'volume', 'vwap', 'mkt_cap',
'mkt_cap_real', 'mkt_cap_ff', 'add_act', 'add_pos_bal', 'tx_count',
'tx_rate', 'tx_fee_mean', 'tx_fee_mean_usd', 'tfr_count',
'tfr_val_mean', 'tfr_val_mean_usd', 'nvt_ratio_adj', 'nvt_ratio_90dma',
'nvt_ratio_ff', 'nvt_ratio_ff_90dma', 'velocity_1y', 'hashrate',
'diff_last', 'diff_mean', 'block_size_mean', 'miner_rev',
'miner_rev_usd', 'miner_rev_fees ', 'miner_rev_fees_usd',
'miner_rev_total_usd', 'supply_circ', 'supply_ff', 'issuance',
'supply_act_pct_1y'],
dtype='object')