{ "info": { "author": "Cedric Zhuang", "author_email": "jealous@163.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Utilities" ], "description": "Stock data source for Chinese markets\n=====================================\n\n.. image:: https://travis-ci.org/jealous/cn_stock_src.svg\n :target: https://travis-ci.org/jealous/cn_stock_src\n\n.. image:: https://coveralls.io/repos/jealous/cn_stock_src/badge.svg\n :target: https://coveralls.io/github/jealous/cn_stock_src\n\nVERSION: 0.1.8\n\nIntroduction\n------------\n\nRetrieve stock data from web interface and saved in pandas ``DataFrame``.\n\nTested on python 2.7, 3.4, 3.5 and pypy.\n\nInstallation\n------------\n\n``pip install cn_stock_src``\n\n\nTutorial\n--------\n\n- Get the latest trading data for stock indices.\n\nExample:\n\n.. code-block:: python\n\n latest('sh600000', 'sh600238', 'sz000001')\n\n\nOutput:\n\n::\n\n name open close price high low volume amount \\\n sh600000 \u6d66\u53d1\u94f6\u884c 13.93 14.22 12.87 13.95 12.80 334859429 4.407389e+09\n sh600238 \u6d77\u5357\u6930\u5c9b 12.60 12.91 11.62 12.60 11.62 12069736 1.421766e+08\n sz000001 \u5e73\u5b89\u94f6\u884c 11.10 11.50 10.35 11.17 10.35 151802968 1.601529e+09\n\n buy1_volume buy1_price ... sell2_volume sell2_price \\\n sh600000 981800 12.87 ... 71334 12.89\n sh600238 0 0.00 ... 12913 11.63\n sz000001 0 0.00 ... 284420 10.36\n\n sell3_volume sell3_price sell4_volume sell4_price sell5_volume \\\n sh600000 241900 12.90 238100 12.91 37500\n sh600238 2000 11.65 2300 11.68 9200\n sz000001 68739 10.37 212580 10.38 57200\n\n sell5_price date time\n sh600000 12.92 20150824 15:03:04\n sh600238 11.70 20150824 15:03:04\n sz000001 10.39 20150824 15:05:55\n\n [3 rows x 30 columns]\n\n- Get the basic company information for stock indices.\n\nExample:\n\n.. code-block:: python\n\n latest_company_info('sh600000', 'sh600238', 'sz000001')\n\nOutput:\n\n::\n\n type pinyin per-share earnings(year)\n sh600000 A pfyh 2.521\n sh600238 A hnyd 0.090\n sz000001 A payh 1.730\n\n per-share earnings(four quarters) per-share earnings(quarter)\n sh600000 2.5877 1.2810\n sh600238 0.0038 0.0033\n sz000001 1.7603 0.8400\n\n net assets per share unknown general capital(10,000Y)\n sh600000 13.7120 6085.9750 1865347.1415\n sh600238 1.9813 517.2827 44820.0000\n sz000001 10.5400 3688.2195 1430867.6139\n\n floating stock(10,000Y) floating A stock(10,000Y)\n sh600000 1492277.7132 1492277.7132\n sh600238 44473.1580 44473.1580\n sz000001 1180405.4579 1180405.4579\n\n floating B stock(10,000Y) currency annual net profit(10**8Y)\n sh600000 0 CNY 470.2600\n sh600238 0 CNY 0.4189\n sz000001 0 CNY 198.0200\n\n four quarters net profit(10**8Y) issue price unknown\n sh600000 482.7300 10.0 1\n sh600238 0.0178 4.1 1\n sz000001 213.1500 40.0 1\n\n return on equity quarter main business income(10**8Y)\n sh600000 9.35 707.01\n sh600238 0.17 1.88\n sz000001 7.68 465.75\n\n quarter net profit(10**8Y)\n sh600000 239.0300\n sh600238 0.0148\n sz000001 115.8500\n\n- Get the daily k-line for stock indices\n\nExample:\n\n.. code-block:: python\n\n data = daily_k_line('sh600000', 'sh600238', 'sz000001')\n data.next()\n\nOutput:\n\n::\n\n sh600000 open high low close volume adjClose\n date\n 19991110 29.50000 29.80000 27.00001 27.74999 617827800 5.03743\n 19991111 27.57999 28.38001 27.52998 27.70999 104352900 5.03017\n 19991112 27.86001 28.30001 27.77000 28.04998 53263200 5.09189\n ... ... ... ... ... ... ...\n 20150819 14.87000 15.17000 14.50000 15.00000 199062100 15.00000\n 20150820 14.94000 14.99000 14.66000 14.68000 88124700 14.68000\n 20150821 14.61000 14.74000 14.20000 14.22000 123792800 14.22000\n\n\n- Get history basic financial data of a stock (by season).\n\nThis result is parsed from html from netease. Use it with caution.\n\nExample:\n\n.. code-block:: python\n\n financial_info('sh600238')\n\nOutput:\n\n::\n\n name per-share earnings net assets per share \\\n date\n 20150930 \u6d77\u5357\u6930\u5c9b -0.03 1.95\n 20150630 \u6d77\u5357\u6930\u5c9b 0 None\n 20150331 \u6d77\u5357\u6930\u5c9b 0 None\n ...\n Net cash flow from operating activities per share \\\n date\n 20150930 -0.22\n 20150630 None\n 20150331 None\n ...\n main business income(10**5) main business profit(10**5) \\\n date\n 20150930 6827 1967\n 20150630 9150 2929\n 20150331 9649 3658\n ...\n operating profit(10**5) equity earnings(10**5) \\\n date\n 20150930 -2628 -759\n 20150630 -1232 -104\n 20150331 86 550\n ...\n net non-operating income(10**5) total profit(10**5) \\\n date\n 20150930 None -1381\n 20150630 None -49\n 20150331 None 275\n ...\n net margin(10**5) \\\n date\n 20150930 -1448\n 20150630 77\n 20150331 72\n ...\n Net profit (ex. non recurring gains and losses)(10**5) \\\n date\n 20150930 None\n 20150630 None\n 20150331 None\n ...\n Net cash flow from operating activities(10**5) \\\n date\n 20150930 -10066\n 20150630 -7532\n 20150331 -3412\n ...\n Net increase in cash and cash equivalents(10**5) total assets(10**5) \\\n date\n 20150930 -7977 124629\n 20150630 -8384 126958\n 20150331 -912 137809\n ...\n floating assets(10**5) gross liabilities(10**5) \\\n date\n 20150930 77675 37206\n 20150630 79353 38078\n 20150331 89095 49008\n ...\n floating liabilities(10**5) shareholders interests(10**5) \\\n date\n 20150930 29585 87346\n 20150630 30422 88801\n 20150331 41316 88723\n ...\n net assets yield weighted (%)\n date\n 20150930 -1.48\n 20150630 0.17\n 20150331 0.08\n ...\n per-share earnings net assets per share \\\n date\n 20150930 -0.03 1.95\n 20150630 0 None\n 20150331 0 None\n ...\n Net cash flow from operating activities per share \\\n date\n 20150930 -0.22\n 20150630 None\n 20150331 None\n ...\n main business income(10**5) main business profit(10**5) \\\n date\n 20150930 6827 1967\n 20150630 9150 2929\n 20150331 9649 3658\n ...\n operating profit(10**5) equity earnings(10**5) \\\n date\n 20150930 -2628 -759\n 20150630 -1232 -104\n 20150331 86 550\n ...\n net non-operating income(10**5) total profit(10**5) \\\n date\n 20150930 None -1381\n 20150630 None -49\n 20150331 None 275\n ...\n net margin(10**5) \\\n date\n 20150930 -1448\n 20150630 77\n 20150331 72\n ...\n Net profit (ex. non recurring gains and losses)(10**5) \\\n date\n 20150930 None\n 20150630 None\n 20150331 None\n ...\n Net cash flow from operating activities(10**5) \\\n date\n 20150930 -10066\n 20150630 -7532\n 20150331 -3412\n ...\n Net increase in cash and cash equivalents(10**5) total assets(10**5) \\\n date\n 20150930 -7977 124629\n 20150630 -8384 126958\n 20150331 -912 137809\n ...\n floating assets(10**5) gross liabilities(10**5) \\\n date\n 20150930 77675 37206\n 20150630 79353 38078\n 20150331 89095 49008\n ...\n floating liabilities(10**5) shareholders interests(10**5) \\\n date\n 20150930 29585 87346\n 20150630 30422 88801\n 20150331 41316 88723\n ...\n net assets yield weighted (%)\n date\n 20150930 -1.48\n 20150630 0.17\n 20150331 0.08\n ...\n\nTo file issue, please visit:\n\nhttps://github.com/jealous/cn_stock_src\n\n\nContact author:\n\njealous@163.com", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jealous/cn_stock_src", "keywords": "Stock data retriever for China stock market.", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "cn_stock_src", "package_url": "https://pypi.org/project/cn_stock_src/", "platform": "any", "project_url": "https://pypi.org/project/cn_stock_src/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/jealous/cn_stock_src" }, "release_url": "https://pypi.org/project/cn_stock_src/0.1.8/", "requires_dist": null, "requires_python": null, "summary": "Utility for retrieving basic China stock data from different sources.", "version": "0.1.8" }, "last_serial": 2148348, "releases": { "0.0.1": [], "0.1.0": [ { "comment_text": "", "digests": { "md5": "42da434d849037676b316da47bd63abf", "sha256": "33ab4f6de4691d337b3ff4b270190b56d767640efcbc506e42ad820eb9e4ff27" }, "downloads": -1, "filename": "cn_stock_src-0.1.0.zip", "has_sig": false, "md5_digest": "42da434d849037676b316da47bd63abf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22989, "upload_time": "2015-08-24T16:38:45", "url": "https://files.pythonhosted.org/packages/d6/00/ea7632997f7cfb2cb45de718fe66532dc83568a13f67cc77804574487bd6/cn_stock_src-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5ceb513e175ee05203fceb64f0fafd09", "sha256": "be2430499242942843a650f42e26977e1ad8cb5190506b4d4d3fb822197191a9" }, "downloads": -1, "filename": "cn_stock_src-0.1.1.zip", "has_sig": false, "md5_digest": "5ceb513e175ee05203fceb64f0fafd09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22953, "upload_time": "2015-08-24T17:11:00", "url": "https://files.pythonhosted.org/packages/cc/57/e9c8ed1f46cc7d785d029152a06d024d6a0945f3e7ac494e4bb0c10f88b4/cn_stock_src-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "c67ad1e466c1ad5a488c8dcb9b387c1b", "sha256": "8e1804870f9d4dffe264f0c3bba70ca3a794cc95bfb9edaff2d25ea5e0a8aecb" }, "downloads": -1, "filename": "cn_stock_src-0.1.2.zip", "has_sig": false, "md5_digest": "c67ad1e466c1ad5a488c8dcb9b387c1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22949, "upload_time": "2015-08-24T17:21:41", "url": "https://files.pythonhosted.org/packages/6f/fc/b1db7d739592946efead32fadaa73cdb4bdecacbdb24c9fe69fdf4beb300/cn_stock_src-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d3fa8e9fdd75fee3eefe9eaeaaca1348", "sha256": "7adcb710822ee583355631eba3eae627a1f8ab3d66fd989d859ca62390030ca8" }, "downloads": -1, "filename": "cn_stock_src-0.1.3.zip", "has_sig": false, "md5_digest": "d3fa8e9fdd75fee3eefe9eaeaaca1348", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22951, "upload_time": "2015-08-24T17:24:24", "url": "https://files.pythonhosted.org/packages/ea/af/e1fbda487220550bf9261e411a2a99b16a803607491d1dce878ac08166f8/cn_stock_src-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2601689276b3788a2982636c645f8568", "sha256": "5c6df1038915d06d03ffebfbd82781f67106afe30b988d0c41bf09b3f90b6820" }, "downloads": -1, "filename": "cn_stock_src-0.1.4.zip", "has_sig": false, "md5_digest": "2601689276b3788a2982636c645f8568", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23121, "upload_time": "2015-08-24T17:46:22", "url": "https://files.pythonhosted.org/packages/89/3e/9d7257dd6a6bbfcb83e99e77d42f412a087df8ed2516e65a86c1c7430d62/cn_stock_src-0.1.4.zip" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "fb9f9c6d33755c95cb51605349609cf9", "sha256": "818170ce68344b0fbd7ce4822dfe14d854c2c94d6c5a8f4360a75c4311e59745" }, "downloads": -1, "filename": "cn_stock_src-0.1.5.zip", "has_sig": false, "md5_digest": "fb9f9c6d33755c95cb51605349609cf9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27355, "upload_time": "2015-11-22T18:25:16", "url": "https://files.pythonhosted.org/packages/f6/76/9ee17e2acc40480441afe3fa575c920c7d91e42245174290c5b6008dae12/cn_stock_src-0.1.5.zip" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "e9bc6011f03b0e42c15f2d70e8ec8676", "sha256": "4efd42accc28dede0ab375a61ae1bc232a8f4eedff8380090f878093996d643f" }, "downloads": -1, "filename": "cn_stock_src-0.1.6.zip", "has_sig": false, "md5_digest": "e9bc6011f03b0e42c15f2d70e8ec8676", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27520, "upload_time": "2016-01-06T04:06:33", "url": "https://files.pythonhosted.org/packages/47/bb/32f334c2ed5a7b3a7cb53055b1a3b4a8cfa07de7ed8291698377e0be9382/cn_stock_src-0.1.6.zip" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "13e0e75879bc2727ce96c0fdb2138967", "sha256": "17f5acdc16bd9d4d231efcd3a857a771cd034625f5c725292942ea67f4e7f847" }, "downloads": -1, "filename": "cn_stock_src-0.1.7.zip", "has_sig": false, "md5_digest": "13e0e75879bc2727ce96c0fdb2138967", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27567, "upload_time": "2016-02-29T14:59:41", "url": "https://files.pythonhosted.org/packages/50/28/bacd204472241a82757c331928dd9b15a877ee8af4863ab7b5f0d34f6b29/cn_stock_src-0.1.7.zip" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "baaaecde4c5d6652aa09b0fafeee266e", "sha256": "8db9889a9fac7327e5189364c8816180e5b3a8050fe8da24e42741cc7046ad45" }, "downloads": -1, "filename": "cn_stock_src-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "baaaecde4c5d6652aa09b0fafeee266e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 41883, "upload_time": "2016-06-03T04:42:12", "url": "https://files.pythonhosted.org/packages/df/8e/3252a83e14440902d173328d84a1db1a3c046f15655054f957b29b9f6839/cn_stock_src-0.1.8-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "baaaecde4c5d6652aa09b0fafeee266e", "sha256": "8db9889a9fac7327e5189364c8816180e5b3a8050fe8da24e42741cc7046ad45" }, "downloads": -1, "filename": "cn_stock_src-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "baaaecde4c5d6652aa09b0fafeee266e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 41883, "upload_time": "2016-06-03T04:42:12", "url": "https://files.pythonhosted.org/packages/df/8e/3252a83e14440902d173328d84a1db1a3c046f15655054f957b29b9f6839/cn_stock_src-0.1.8-py2.py3-none-any.whl" } ] }