Metadata-Version: 2.3
Name: ocfinance
Version: 0.0.2
Summary: Download on-chain data for bitcoin (works for cryptoquant)
Project-URL: Homepage, https://github.com/dhruvan2006/ocfinance
Project-URL: Issues, https://github.com/dhruvan2006/ocfinance/issues
Author-email: Dhruvan Gnanadhandayuthapani <dhruvan2006@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: beautifulsoup4
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: seleniumbase
Description-Content-Type: text/markdown

# OCFINANCE (Works with Cryptoquant)

Download On-Chain data from cryptoquant, checkonchain, etc.

## Installation
Use pip to install the ocfinance package.
```bash
pip install ocfinance
```

## Supported Websites
- **[CheckOnChain](https://charts.checkonchain.com/)** (recommended)
- **[ChainExposed](https://chainexposed.com/)** (recommended)
- **[Woocharts](https://woocharts.com/)** (recommended)
- **[Cryptoquant](https://cryptoquant.com/)** (_follow guide below_)
- [Bitbo Charts](https://charts.bitbo.io/) (slow)
- [Bitcoin Magazine Pro](https://www.bitcoinmagazinepro.com) (slow)

## Usage
Get the url of the chart and download it:

```python
import ocfinance as of
data = of.download("https://charts.checkonchain.com/btconchain/pricing/pricing_picycleindicator/pricing_picycleindicator_light.html")

# Export as CSV
data.to_csv('out.csv')
```
## Cryptoquant guide
**_Email and password of your account are required._**

**Works only with third party indicators**

Pass your email and password to the download function (preferably using environment variables)
```python
import os
import ocfinance as of

email = os.getenv('CRYPTOQUANT_EMAIL')
password = os.getenv('CRYPTOQUANT_PASSWORD')

data = of.download(
    "https://cryptoquant.com/analytics/query/66451fd6f3cac64b85386229?v=66451fd6f3cac64b8538622b",
    email=email,
    password=password
)
```
The  url that needs to be passed can be access like so:

![Click the source button](/assets/cryptoquant_step1.png)
![Copy the url](/assets/cryptoquant_step2.png)
