Metadata-Version: 2.4
Name: coinxview
Version: 1.0.0
Summary: Free crypto price API client: prices, market cap, OHLC candles, Fear & Greed and risk scores. No API key, no dependencies.
Author: CoinXview
License: MIT
Project-URL: Homepage, https://coinxview.com/free-crypto-api
Project-URL: Documentation, https://coinxview.com/free-crypto-api
Keywords: crypto,cryptocurrency,bitcoin,ethereum,price,api,market cap,ohlc,fear and greed
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# coinxview

Free crypto price API client for Python. Prices, market cap, OHLC candles, Fear & Greed and risk scores for 1,000+ coins, aggregated from 20+ exchanges.

- No API key, no signup
- Standard library only (no dependencies), Python 3.8+
- Type hints included

Full API docs: **https://coinxview.com/free-crypto-api**

## Install

```bash
pip install coinxview
```

## Examples

```python
import coinxview

# 1. Prices for a few coins
for c in coinxview.coins(symbols=["BTC", "ETH", "SOL"])["data"]:
    print(c["symbol"], c["price_usd"])

# 2. Top 100 by market cap
top = coinxview.coins(limit=100)

# 3. One coin: markets, supply, 24h high / low
btc = coinxview.coin("BTC")

# 4. Daily candles: [time, open, high, low, close, volume]
candles = coinxview.ohlc("ETH", interval="1d", limit=30)

# 5. Market overview, Fear & Greed, risk score
overview = coinxview.global_()      # "global" is a Python keyword
fg = coinxview.fear_greed()
risk = coinxview.risk("DOGE")
```

Or create a client with your own timeout:

```python
from coinxview import CoinXview
cx = CoinXview(timeout=10)
cx.coins(limit=10)
```

## Methods

| Method | Endpoint |
|---|---|
| `coins(symbols=None, limit=None, start=None)` | `GET /api/v1/coins` |
| `coin(symbol)` | `GET /api/v1/coins/:symbol` |
| `global_()` | `GET /api/v1/global` |
| `fear_greed()` | `GET /api/v1/fear-greed` |
| `ohlc(symbol, interval="1d", limit=None)` | `GET /api/v1/ohlc/:symbol` — interval `1h`, `4h`, `1d`, `1w` |
| `risk(symbol)` | `GET /api/v1/risk/:symbol` |

Responses are returned as-is (same field names as the API docs).

## Errors and limits

Rate limit: **60 requests per minute per IP**. Over the limit, calls raise `CoinXviewError` with `status == 429`. Other HTTP errors raise `CoinXviewError` with the HTTP `status` and the response `body`.

```python
from coinxview import CoinXviewError
try:
    coinxview.coin("NOPE")
except CoinXviewError as e:
    print(e.status)
```

## Attribution

Data by [CoinXview](https://coinxview.com) — please keep attribution when you show this data.

## License

MIT
