## Plasma Finance Sdk
Plasma Finance Sdk 是一个基于 Python 的金融数据获取工具包;它提供了简单高效的 API 接口,能方便快速的获取金融相关数据,协助您进行量化研究。
使用方式也非常简单:
```python
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
## 文档
https://www.ultrastiching.com/home
Raw data
{
"_id": null,
"home_page": "https://www.ultrastiching.com/home",
"name": "plasmasdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "python, finance, sdk, api",
"author": "Zhaolantao",
"author_email": "zhaolantao1995@163.com",
"download_url": "https://files.pythonhosted.org/packages/98/0f/711275f0305b4bbde561fe676bdb2f26de349dc3146319bd6ff65715b1d1/plasmasdk-1.0.2.tar.gz",
"platform": null,
"description": "## Plasma Finance Sdk\r\n\r\nPlasma Finance Sdk \u662f\u4e00\u4e2a\u57fa\u4e8e Python \u7684\u91d1\u878d\u6570\u636e\u83b7\u53d6\u5de5\u5177\u5305;\u5b83\u63d0\u4f9b\u4e86\u7b80\u5355\u9ad8\u6548\u7684 API \u63a5\u53e3,\u80fd\u65b9\u4fbf\u5feb\u901f\u7684\u83b7\u53d6\u91d1\u878d\u76f8\u5173\u6570\u636e,\u534f\u52a9\u60a8\u8fdb\u884c\u91cf\u5316\u7814\u7a76\u3002\r\n\r\n\u4f7f\u7528\u65b9\u5f0f\u4e5f\u975e\u5e38\u7b80\u5355\uff1a\r\n\r\n```python\r\nfrom plasmasdk.sdk_v2 import *\r\n\r\nif __name__ == '__main__':\r\n # \u9274\u6743\u4fe1\u606f\r\n access_key = \"\"\r\n secret_key = \"\"\r\n res_method = 'POST'\r\n server_ip = ''\r\n # \u8bbe\u7f6e\u5168\u5c40\u9274\u6743\u4fe1\u606f\r\n set_global_info(AccessKey = access_key,SecretKey = secret_key,ResMethod = res_method,ServerIp = server_ip)\r\n # 000688\u79d1\u521b50\u6307\u6570\u6210\u5206\u80a1\r\n index_component = get_index_indexcomponent(symbols=[\"000688\"])\r\n # \u6210\u5206\u80a1\u6570\u91cf\r\n print(\"index_component_length:\",len(index_component['symbol']))\r\n symbols = index_component['symbol']\r\n # \u8bbe\u7f6e\u62a5\u544a\u671f\r\n report_date1 =['20231231']\r\n # \u6307\u6807\u5b57\u6bb5\u57df (\u8d44\u4ea7\u603b\u8ba1,\u8d1f\u503a\u5408\u8ba1,\u5f52\u5c5e\u4e8e\u6bcd\u516c\u53f8\u6240\u6709\u8005\u6743\u76ca\u5408\u8ba1,\u8d27\u5e01\u8d44\u91d1)\r\n field = [\"totasset\",\"totliab\",\"paresharrigh\",\"curfds\"]\r\n # \u6307\u6807\u5bf9\u5e94\u51fd\u6570\r\n functions_and_args = [(\"totasset\", \"get_s_totasset\",{\"code\": symbols, \"report_date\": report_date1, \"report_type\": '3'})]\r\n\r\n import time\r\n start_time = time.time()\r\n result = get_query_builder(field,functions_and_args)\r\n # result['symbol']=result.apply(lambda x:str(x['symbol']),axis=1)\r\n # result.to_csv(\"fundamental.csv\",index=False)\r\n print(\"finance date :\" + str(result))\r\n end_time = time.time()\r\n execution_time = end_time - start_time\r\n print(f\"ALLQUERY\u6267\u884c\u65f6\u95f4\uff1a{execution_time} \u79d2\")\r\n```\r\n\r\n## \u5b89\u88c5\r\n\r\npip install plasmasdk\r\n\r\n## \u6587\u6863\r\n\r\nhttps://www.ultrastiching.com/home\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Plasma Finance SDK",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://www.ultrastiching.com/home"
},
"split_keywords": [
"python",
" finance",
" sdk",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d4e98ac5c45bc40e20a440eb3e56758c3e5968a5a1faa7eb862e920a4be54d75",
"md5": "3efeb6dc72ca6f19d54b656a1d06b8d9",
"sha256": "ed79d44bc6381e5f95d0d692e85ae4d3326a5ae03222290e3270cb89d9982911"
},
"downloads": -1,
"filename": "plasmasdk-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3efeb6dc72ca6f19d54b656a1d06b8d9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 72463,
"upload_time": "2024-10-24T08:59:01",
"upload_time_iso_8601": "2024-10-24T08:59:01.484998Z",
"url": "https://files.pythonhosted.org/packages/d4/e9/8ac5c45bc40e20a440eb3e56758c3e5968a5a1faa7eb862e920a4be54d75/plasmasdk-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "980f711275f0305b4bbde561fe676bdb2f26de349dc3146319bd6ff65715b1d1",
"md5": "eb84c48a92db4bc0126efcbb1030cf7f",
"sha256": "364868a968e5ed6e7113c5a5b364a89bf35c7daa0d4f7817254810701ec9a746"
},
"downloads": -1,
"filename": "plasmasdk-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "eb84c48a92db4bc0126efcbb1030cf7f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 71368,
"upload_time": "2024-10-24T08:59:02",
"upload_time_iso_8601": "2024-10-24T08:59:02.830037Z",
"url": "https://files.pythonhosted.org/packages/98/0f/711275f0305b4bbde561fe676bdb2f26de349dc3146319bd6ff65715b1d1/plasmasdk-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-24 08:59:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "plasmasdk"
}