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

pip install optshare --upgrade

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.54.tar.gz (20.2 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.54-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: optshare-0.1.54.tar.gz
  • Upload date:
  • Size: 20.2 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.54.tar.gz
Algorithm Hash digest
SHA256 28167f4c1b939d59d5c66fa3847b16fc93e93c06c624b3ec1f328f390009a275
MD5 72c474a4de634c45b10caf215639f196
BLAKE2b-256 bd09996c53dacc1dc5f1b3a747a532dd32e537c95816fc0f28af9bb873a1f22c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: optshare-0.1.54-py3-none-any.whl
  • Upload date:
  • Size: 23.1 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.54-py3-none-any.whl
Algorithm Hash digest
SHA256 0385d69348e955344ad93de90d03857cea445a6659e3a3e43b33226e334c86eb
MD5 05b98323525e89d1fe6c35310e844403
BLAKE2b-256 9d299f8b8047ef42935de99350bae27b41b8dae042c73b0552c2206b7b59aa1c

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