Skip to main content

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

  1. mcx_bhavcopy(bhavdate)

    Fetch the bhacopy of the given date

  2. mcx_circulars(from_date, to_date)

    Fetch Circulars. By default it will return last 4 days circulars.

***Below Functions names are self-explanatory.

  1. mcx_marketwatch()

  2. mcx_topgainers()

  3. mcx_toploosers()

  4. mcx_mostactiveoptions()

  5. mcx_mostactivecontracts()

  6. mcx_heatmap()

  7. 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)
  1. mcx_optionchain(commodity, expiry)

    Fetch the optionchain.

  2. mcx_pcr(expirywise)

    Returns the pcr. By default expirywise is False (Returns commoditywise pcr)

  3. 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)

Source distribution for mcxpy 0.0.3
File Size Uploaded
mcxpy-0.0.3.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcxpy 0.0.3
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page