Metadata-Version: 2.4
Name: btc2
Version: 0.1.1
Summary: Simple cryptocurrency price fetching from 10 top exchanges
Author-email: btc2 <btc2@example.com>
License: MIT
Project-URL: Homepage, https://github.com/btc2/btc2
Project-URL: Repository, https://github.com/btc2/btc2
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: aiohttp>=3.9.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"

# btc2

Simple cryptocurrency price fetching from 10 top exchanges.

## Install

```bash
pip install btc2
```

## Quick Start

```python
import btc2

# Print price (no parentheses needed for print)
print(btc2.btc)        # → 67432.50
print(btc2.eth)        # → 2378.92
print(btc2.btc.all)    # → {"binance": 67432.50, ...}

# Get price as number (use parentheses)
btc2.btc()             # → 67432.50
btc2.btc.binance()     # → 67432.50
btc2.btc.binance.fut() # → 67450.00

# For calculations
price = float(btc2.btc)  # → 67432.50
```

## Alternative import

```python
from btc2 import btc, eth

print(btc)    # → 67432.50
btc()         # → 67432.50
```

## Supported Coins

- btc, bitcoin → BTC
- eth, ethereum → ETH
- sol, solana → SOL
- xrp, ripple → XRP
- ada, cardano → ADA
- doge, dogecoin → DOGE
- dot, polkadot → DOT
- avax, avalanche → AVAX
- link, chainlink → LINK
- matic, polygon → MATIC
- shib, shiba → SHIB
- ltc, litecoin → LTC
- trx, tron → TRX
- uni, uniswap → UNI
- atom, cosmos → ATOM
- xlm, stellar → XLM
- bch, bitcoin-cash → BCH
- etc, ethereum-classic → ETC
- fil, filecoin → FIL
- apt, aptos → APT
- arb, arbitrum → ARB
- op, optimism → OP
- near, near-protocol → NEAR
- sui, sui-network → SUI
- pepe, pepecoin → PEPE
- ton, toncoin → TON
- inj, injective → INJ
- rndr, render → RNDR
- imx, immutable → IMX
- vet, vechain → VET
- algo, algorand → ALGO
- ftm, fantom → FTM
- sand, sandbox → SAND
- mana, decentraland → MANA
- axs, axie → AXS
- gala, galaxy → GALA

And more (top 50+ coins supported)

## Supported Exchanges

- binance
- bybit
- okx
- coinbase
- kraken
- kucoin
- gate
- bitget
- huobi
- mexc

## API Reference

| Syntax | Description |
|--------|-------------|
| `btc.binance` | BTC on Binance spot (default) |
| `btc.binance.spot` | BTC on Binance spot |
| `btc.binance.fut` | BTC on Binance futures |
| `eth.bybit` | ETH on Bybit spot |
| `btc.all` | BTC price from all exchanges (spot) |
| `btc.all.fut` | BTC futures from all exchanges |
| `btc()` | Same as `btc.all` |

## Notes

- All prices are fetched asynchronously in parallel for speed
- Results are cached for 1 second to avoid rate limiting
- If an exchange is unavailable, it will be skipped in results
- Futures are supported on: binance, bybit, okx, kucoin, gate, bitget, mexc

## License

MIT

