Skip to main content

Python package for option, index, and yield data

Project description

OptShare

Special thanks to AKshare for the opportunity to learn from this project in terms of code and project development.

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 data is the official website and raw data published by eastmoney financial website.

Installation

Python 3.9(64-bit) or later

pip install optshare

Usage

Code

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]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optshare-0.1.66.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optshare-0.1.66-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file optshare-0.1.66.tar.gz.

File metadata

  • Download URL: optshare-0.1.66.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for optshare-0.1.66.tar.gz
Algorithm Hash digest
SHA256 6d5842c42ba460a397ee9862b5b9995e3a28764da50217c6cae0bc4e98060af5
MD5 36dde249bb19c57bf50d7327067e17e5
BLAKE2b-256 a3493471f21669ce9fb186e8f2f72ff74989aa1f1f3fbf4e66c3d0199da30187

See more details on using hashes here.

File details

Details for the file optshare-0.1.66-py3-none-any.whl.

File metadata

  • Download URL: optshare-0.1.66-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for optshare-0.1.66-py3-none-any.whl
Algorithm Hash digest
SHA256 7c3f5aae8f390c2301ef03eb7aac8a26d28b0607982d8a6f7b3562dc8dd89a87
MD5 e07a54cb59cd057693b538444e50d5b6
BLAKE2b-256 41fb0790c22c0c66bbd762873d5391728e06286fa511c68968e8e970610129fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page