Plasma Finance SDK
Project description
Plasma Finance Sdk
Plasma Finance Sdk 是一个基于 Python 的金融数据获取工具包;它提供了简单高效的 API 接口,能方便快速的获取金融相关数据,协助您进行量化研究。
使用方式也非常简单:
from plasmasdk.sdk_v2 import *
if __name__ == '__main__':
# 鉴权信息
access_key = ""
secret_key = ""
res_method = 'POST'
server_ip = ''
# 设置全局鉴权信息
set_global_info(AccessKey = access_key,SecretKey = secret_key,ResMethod = res_method,ServerIp = server_ip)
# 000688科创50指数成分股
index_component = get_index_indexcomponent(symbols=["000688"])
# 成分股数量
print("index_component_length:",len(index_component['symbol']))
symbols = index_component['symbol']
# 设置报告期
report_date1 =['20231231']
# 指标字段域 (资产总计,负债合计,归属于母公司所有者权益合计,货币资金)
field = ["totasset","totliab","paresharrigh","curfds"]
# 指标对应函数
functions_and_args = [("totasset", "get_s_totasset",{"code": symbols, "report_date": report_date1, "report_type": '3'})]
import time
start_time = time.time()
result = get_query_builder(field,functions_and_args)
# result['symbol']=result.apply(lambda x:str(x['symbol']),axis=1)
# result.to_csv("fundamental.csv",index=False)
print("finance date :" + str(result))
end_time = time.time()
execution_time = end_time - start_time
print(f"ALLQUERY执行时间:{execution_time} 秒")
安装
pip install plasmasdk
文档
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
plasmasdk-1.0.2.tar.gz
(71.4 kB
view details)
Built Distribution
plasmasdk-1.0.2-py3-none-any.whl
(72.5 kB
view details)
File details
Details for the file plasmasdk-1.0.2.tar.gz
.
File metadata
- Download URL: plasmasdk-1.0.2.tar.gz
- Upload date:
- Size: 71.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 364868a968e5ed6e7113c5a5b364a89bf35c7daa0d4f7817254810701ec9a746 |
|
MD5 | eb84c48a92db4bc0126efcbb1030cf7f |
|
BLAKE2b-256 | 980f711275f0305b4bbde561fe676bdb2f26de349dc3146319bd6ff65715b1d1 |
File details
Details for the file plasmasdk-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: plasmasdk-1.0.2-py3-none-any.whl
- Upload date:
- Size: 72.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed79d44bc6381e5f95d0d692e85ae4d3326a5ae03222290e3270cb89d9982911 |
|
MD5 | 3efeb6dc72ca6f19d54b656a1d06b8d9 |
|
BLAKE2b-256 | d4e98ac5c45bc40e20a440eb3e56758c3e5968a5a1faa7eb862e920a4be54d75 |