optshare


Nameoptshare JSON
Version 0.1.61 PyPI version JSON
download
home_pagehttps://yulu0131.github.io/
SummaryPython package for option, index, and yield data
upload_time2023-02-07 09:04:04
maintainer
docs_urlNone
authorYu Lu
requires_python>=3.10
licenseFree for non-commercial use
keywords derivatives finance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OPTshare

Special thanks to [AKshare](https://github.com/akfamily/akshare) for the opportunity to learn from this project in terms of code and project development.

[OPTshare](https://github.com/yulu0131/optshare) is a Python-based option data interface library, designed to provide easy-to-use option data, index data, and market yield data.

The main source of [OPTshare](https://github.com/yulu0131/optshare) data is the official website and raw data published by [eastmoney](https://www.eastmoney.com/) financial website.

- Documentation: [文档链接](https://optshare.readthedocs.io/en/latest/) 

## Installation

```
pip install optshare --upgrade
```

## Usage
### Code

```python
import optshare

current_option_data = optshare.get_current_option()
print(current_option_data)
```
### Output

```
                代码               名称   最新价    涨跌额      涨跌幅     成交量       成交额  \
0       a2305p4500    豆一23年05月沽4500  50.0   49.5  9900.00     1.0     500.0   
1        i2305p510    铁矿石23年05月沽510   3.0    2.9  2900.00     1.0     300.0   
2       v2305c9000   PVC23年05月购9000  12.5   12.0  2400.00     4.0     247.0   
3       v2305c9200   PVC23年05月购9200  12.0   11.5  2300.00    23.0    1280.0   
4      p2305c12600  棕榈油23年05月购12600   9.5    9.0  1800.00  2407.0  197575.0   
...            ...              ...   ...    ...      ...     ...       ...   
11963   y2303p8100    豆油23年03月沽8100   0.5   -2.0   -80.00   133.0    1135.0   
11964   y2303p8400    豆油23年03月沽8400   3.0  -13.5   -81.82   942.0   46570.0   
11965   SR303P5400    白糖23年03月沽5400   0.5   -2.5   -83.33   656.0    6560.0   
11966   y2303p8300    豆油23年03月沽8300   1.5   -8.0   -84.21   874.0   19995.0   
11967   v2309c7000   PVC23年09月购7000  40.0 -312.5   -88.65     1.0     200.0   

           持仓量  行权价  剩余日      日增     昨结    今开  
0        183.0  NaN  NaN     0.0    0.5  50.0  
1        745.0  NaN  NaN     0.0    0.1   3.0  
2        211.0  NaN  NaN     0.0    0.5  12.0  
3        133.0  NaN  NaN    -7.0    0.5  10.5  
4      12173.0  NaN  NaN  1360.0    0.5   7.0  
...        ...  ...  ...     ...    ...   ...  
11963    742.0  NaN  NaN   -80.0    2.5   1.0  
11964    630.0  NaN  NaN   148.0   16.5   6.5  
11965   5193.0  NaN  NaN   -82.0    3.0   0.5  
11966   7134.0  NaN  NaN   -32.0    9.5   3.5  
11967      9.0  NaN  NaN     0.0  352.5  40.0  

[11968 rows x 13 columns]
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://yulu0131.github.io/",
    "name": "optshare",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "derivatives,finance",
    "author": "Yu Lu",
    "author_email": "luyudso@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a5/fe/e363d007b59b6aa897b2ca4fbd5ba3c7bcd2fc4b77dc33bbb7cbb0304a8e/optshare-0.1.61.tar.gz",
    "platform": null,
    "description": "# OPTshare\n\nSpecial thanks to [AKshare](https://github.com/akfamily/akshare) for the opportunity to learn from this project in terms of code and project development.\n\n[OPTshare](https://github.com/yulu0131/optshare) is a Python-based option data interface library, designed to provide easy-to-use option data, index data, and market yield data.\n\nThe main source of [OPTshare](https://github.com/yulu0131/optshare) data is the official website and raw data published by [eastmoney](https://www.eastmoney.com/) financial website.\n\n- Documentation: [\u6587\u6863\u94fe\u63a5](https://optshare.readthedocs.io/en/latest/) \n\n## Installation\n\n```\npip install optshare --upgrade\n```\n\n## Usage\n### Code\n\n```python\nimport optshare\n\ncurrent_option_data = optshare.get_current_option()\nprint(current_option_data)\n```\n### Output\n\n```\n                \u4ee3\u7801               \u540d\u79f0   \u6700\u65b0\u4ef7    \u6da8\u8dcc\u989d      \u6da8\u8dcc\u5e45     \u6210\u4ea4\u91cf       \u6210\u4ea4\u989d  \\\n0       a2305p4500    \u8c46\u4e0023\u5e7405\u6708\u6cbd4500  50.0   49.5  9900.00     1.0     500.0   \n1        i2305p510    \u94c1\u77ff\u77f323\u5e7405\u6708\u6cbd510   3.0    2.9  2900.00     1.0     300.0   \n2       v2305c9000   PVC23\u5e7405\u6708\u8d2d9000  12.5   12.0  2400.00     4.0     247.0   \n3       v2305c9200   PVC23\u5e7405\u6708\u8d2d9200  12.0   11.5  2300.00    23.0    1280.0   \n4      p2305c12600  \u68d5\u6988\u6cb923\u5e7405\u6708\u8d2d12600   9.5    9.0  1800.00  2407.0  197575.0   \n...            ...              ...   ...    ...      ...     ...       ...   \n11963   y2303p8100    \u8c46\u6cb923\u5e7403\u6708\u6cbd8100   0.5   -2.0   -80.00   133.0    1135.0   \n11964   y2303p8400    \u8c46\u6cb923\u5e7403\u6708\u6cbd8400   3.0  -13.5   -81.82   942.0   46570.0   \n11965   SR303P5400    \u767d\u7cd623\u5e7403\u6708\u6cbd5400   0.5   -2.5   -83.33   656.0    6560.0   \n11966   y2303p8300    \u8c46\u6cb923\u5e7403\u6708\u6cbd8300   1.5   -8.0   -84.21   874.0   19995.0   \n11967   v2309c7000   PVC23\u5e7409\u6708\u8d2d7000  40.0 -312.5   -88.65     1.0     200.0   \n\n           \u6301\u4ed3\u91cf  \u884c\u6743\u4ef7  \u5269\u4f59\u65e5      \u65e5\u589e     \u6628\u7ed3    \u4eca\u5f00  \n0        183.0  NaN  NaN     0.0    0.5  50.0  \n1        745.0  NaN  NaN     0.0    0.1   3.0  \n2        211.0  NaN  NaN     0.0    0.5  12.0  \n3        133.0  NaN  NaN    -7.0    0.5  10.5  \n4      12173.0  NaN  NaN  1360.0    0.5   7.0  \n...        ...  ...  ...     ...    ...   ...  \n11963    742.0  NaN  NaN   -80.0    2.5   1.0  \n11964    630.0  NaN  NaN   148.0   16.5   6.5  \n11965   5193.0  NaN  NaN   -82.0    3.0   0.5  \n11966   7134.0  NaN  NaN   -32.0    9.5   3.5  \n11967      9.0  NaN  NaN     0.0  352.5  40.0  \n\n[11968 rows x 13 columns]\n```\n\n",
    "bugtrack_url": null,
    "license": "Free for non-commercial use",
    "summary": "Python package for option, index, and yield data",
    "version": "0.1.61",
    "split_keywords": [
        "derivatives",
        "finance"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a50b3760bcddf4accac80c37596e0f3cc839c2dd980a8e95ad174c1324b29726",
                "md5": "32ed09cce5d9b2f3d1d8601bd38b02dc",
                "sha256": "4dbeb1652461cc18c911387e492c7d8c6efeeab2c0ce1f6672e9b7395ecc4106"
            },
            "downloads": -1,
            "filename": "optshare-0.1.61-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "32ed09cce5d9b2f3d1d8601bd38b02dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 25290,
            "upload_time": "2023-02-07T09:04:02",
            "upload_time_iso_8601": "2023-02-07T09:04:02.509649Z",
            "url": "https://files.pythonhosted.org/packages/a5/0b/3760bcddf4accac80c37596e0f3cc839c2dd980a8e95ad174c1324b29726/optshare-0.1.61-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5fee363d007b59b6aa897b2ca4fbd5ba3c7bcd2fc4b77dc33bbb7cbb0304a8e",
                "md5": "64aedf1f2550667bf51c08b9d32302f3",
                "sha256": "d5b6527f007b9978c938e50efd112feb5f36a6ae6d654c48b8fcab2007aac23d"
            },
            "downloads": -1,
            "filename": "optshare-0.1.61.tar.gz",
            "has_sig": false,
            "md5_digest": "64aedf1f2550667bf51c08b9d32302f3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 21314,
            "upload_time": "2023-02-07T09:04:04",
            "upload_time_iso_8601": "2023-02-07T09:04:04.747141Z",
            "url": "https://files.pythonhosted.org/packages/a5/fe/e363d007b59b6aa897b2ca4fbd5ba3c7bcd2fc4b77dc33bbb7cbb0304a8e/optshare-0.1.61.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-07 09:04:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "optshare"
}
        
Elapsed time: 0.03693s