datacenter_datasdk
Project description
datacenter_datasdk
INSTALL
step.1
pip install datacenter-datasdk
step.2 add auth(token, password) (ask for admin) before query data
USAGE
from datacenter_datasdk import auth, get_price, get_trade_days, get_security_info
auth(token, password)
data = get_price('600033.XSHG', 'cn', 'm1', start_date='2010-01-01', end_date='2021-01-01')
trade_days = get_trade_days('cn', start_date='2021-01-01', count=10)
info = get_security_info('cn', '600033.XSHG')
API
get_price()
get kline data, include daily, minute and tick
params
code: str or list, single code or multi code as list
region: str, 'cn' or 'us'
frequency: str, represent frequency of kline, 'd1', 'm1', 'm5', 'm15', 'm30', 'm60' and 'tick'(only in cn)
start_date, datetime.datetime or datetime.date or str, start time of data, default '2005-01-01'
end_date, datetime.datetime or datetime.date or str, end time of data, default 0 o'clock of today
return
dataframe
get_trade_days()
get trade days
params
region: str, 'cn' or 'us'
start_date, datetime.datetime or datetime.date or str, start time of data, default None
end_date, datetime.datetime or datetime.date or str, end time of data, default None
count, int, default None
return
list of date
get_security_info()
get security info
params
region: str, 'cn' or 'us'
code: str, default None (get all code info)
return
dataframe
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for datacenter_datasdk-0.2.0.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2546f85aeb1f0a3d4c8b930a935adf613a7b017054c721ba2ecffe5c5cb291df |
|
MD5 | 45837eb75827a0f22348bbfc61b587df |
|
BLAKE2b-256 | c189affa7b40cac6c0a4c50af33ed4d176f57e46765bfaf1f3efe5b4d2bb2858 |
Hashes for datacenter_datasdk-0.2.0.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 177ebec65825b0337332fc357d164d71b338458af8204e9117f827412a404622 |
|
MD5 | c2ed38f3ac907ba79fd7df464d408c86 |
|
BLAKE2b-256 | b30d8b03b86b7cf2bb03cd29a4af06adf59a7c23cc47ab629b58127a7dcbf79c |