Experimental code to fetch data from mcx. Do not use this code to programmatically get data from mcx exchange. This code is uploaded here only for educational purpose. The uploader is not liable for any type of damage caused by or arising from the use of this code.
Installation:
mcxpy can be installed by:
pip install mcxpy
from mcx import *
All Functions outputs are in pandas dataframe/datetime.datetime
-
mcx_bhavcopy(bhavdate)
Fetch the bhacopy of the given date
-
mcx_circulars(from_date, to_date)
Fetch Circulars. By default it will return last 4 days circulars.
***Below Functions names are self-explanatory.
-
mcx_marketwatch()
-
mcx_topgainers()
-
mcx_toploosers()
-
mcx_mostactiveoptions()
-
mcx_mostactivecontracts()
-
mcx_heatmap()
-
mcx_expiry(commodity, instrument, expirytype)
By defaults, it returns the current expiry of Crudeoil options
mcx_expiry()
datetime.datetime(2023, 7, 17, 0, 0)
mcx_expiry(commodity='NATURALGAS',instrument='future',expirytype='current')
datetime.datetime(2023, 7, 26, 0, 0)
-
mcx_optionchain(commodity, expiry)
Fetch the optionchain.
-
mcx_pcr(expirywise)
Returns the pcr. By default expirywise is False (Returns commoditywise pcr)
-
mcx_icomdexindices(datatype,start_date, end_date)
start_date and end_date are needed only for historical datatype. By defaults returns today's data
12 mcx_quote(commodity,instrument, expiry, optiontype, strikeprice, outputtype)
Fetch quote of the given commodity. optiontype and strikeprice needed only for option instrument.
Release files for mcxpy 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcxpy-0.0.3.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcxpy-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / mcxpy-0.0.3.tar.gz
| Download URL | mcxpy-0.0.3.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b016369545c7cd0fbdcfabe2ec6bdb2a4d9a7292f50433a66983ca2ebfcaee14
|
|
BLAKE2b-256 checksum How to use checksums |
1dd9d46ec8570b9ad6a666ded876a39bdcbbd2883f43c58ef19d52ece552916c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / mcxpy-0.0.3-py3-none-any.whl
| Download URL | mcxpy-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6eed15560e2c6bc476c05621ba1c0d3f90859bf3e1d8ed3b85272c84a6e221e0
|
|
BLAKE2b-256 checksum How to use checksums |
f34189390a4cd69533ee5191b89210498b0ce38ff539d2ecf256cf51b53d9fda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|