Skip to main content

For fetching mcx data

Project description

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.

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

mcxpy-0.0.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

mcxpy-0.0.3-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file mcxpy-0.0.3.tar.gz.

File metadata

  • Download URL: mcxpy-0.0.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for mcxpy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b016369545c7cd0fbdcfabe2ec6bdb2a4d9a7292f50433a66983ca2ebfcaee14
MD5 96e654c1a33f2ba64e19ffa8a1704f41
BLAKE2b-256 1dd9d46ec8570b9ad6a666ded876a39bdcbbd2883f43c58ef19d52ece552916c

See more details on using hashes here.

File details

Details for the file mcxpy-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mcxpy-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for mcxpy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6eed15560e2c6bc476c05621ba1c0d3f90859bf3e1d8ed3b85272c84a6e221e0
MD5 21989a6fdf3916ebb1615b0528866917
BLAKE2b-256 f34189390a4cd69533ee5191b89210498b0ce38ff539d2ecf256cf51b53d9fda

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