Metadata-Version: 2.1
Name: mcxpy
Version: 0.0.3
Summary: For fetching mcx data
Author: Tapan Hazarika
License: MIT License
        
        Copyright (c)  2023 Tapan Hazarika
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/Tapanhaz/mcxpy
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas (>=2.0.0)
Requires-Dist: requests


<div class="cell markdown">

***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

</div>

<div class="cell code" execution_count="1">

``` python
from mcx import *
```

</div>

<div class="cell markdown">

***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

</div>

<div class="cell code" execution_count="13">

``` python
mcx_expiry()
```

<div class="output execute_result" execution_count="13">

    datetime.datetime(2023, 7, 17, 0, 0)

</div>

</div>

<div class="cell code" execution_count="14">

``` python
mcx_expiry(commodity='NATURALGAS',instrument='future',expirytype='current')
```

<div class="output execute_result" execution_count="14">

    datetime.datetime(2023, 7, 26, 0, 0)

</div>

</div>

<div class="cell markdown">

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.

</div>
