Metadata-Version: 2.4
Name: alphasec-py
Version: 0.1.0
Summary: trading sdk for alphasec orderbook dex
License-Expression: MIT
License-File: LICENSE
Author: Alphasec
Author-email: dev@alphasec.trade
Requires-Python: >=3.9,<4
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: eth-account (>=0.10.0,<0.14.0)
Requires-Dist: eth-utils (>=2.1.0,<6.0.0)
Requires-Dist: httpx (>=0.27.0,<1.0.0)
Requires-Dist: msgpack (>=1.0.5,<2.0.0)
Requires-Dist: pydantic (>=2.6.0,<3.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: web3 (>=7.13.0,<8.0.0)
Requires-Dist: websocket-client (>=1.5.1,<2.0.0)
Requires-Dist: websockets (>=13.0,<16.0)
Description-Content-Type: text/markdown

# Alphasec Python SDK

A trading SDK for the Alphasec orderbook DEX.

[![PyPI version](https://badge.fury.io/py/alphasec.svg)](https://badge.fury.io/py/alphasec)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


## 🚀 Quick Start

### Install (Not yet deployed)
```bash
pip install alphasec
```

### Configure (required for examples)
```bash
cd examples
cp config/config.json.example config/config.json
# Then edit config.json and fill your values
```

### Minimal config.json
```json
{
  "network": "kairos",
  "api_url": "https://api.alphasec.trade",
  "l1_address": "0x...your_L1_address",
  "l1_wallet": "0x...your_L1_private_key",
  "l2_wallet": "0x...your_L2_private_key",
  "session_enabled": false
}
```

### Run an example
```bash
python examples/market_data/basic_tickers.py
```


## 🌐 Network Information

### Kairos Testnet
- **API URL**: `https://api-testnet.alphasec.trade`
- **Websocket URL**: `wss://api-testnet.alphasec.trade/ws`
- **Network**: `kairos`
- **L1 Chain ID**: 1001 (Kaia Kairos)
- **L2 Chain ID**: 41001 (AlphaSec L2)

### Mainnet
- **API URL**: `https://api.alphasec.trade`
- **Websocket URL**: `wss://api.alphasec.trade/ws`
- **Network**: `mainnet`
- **L1 Chain ID**: 8217 (Kaia Mainnet)
- **L2 Chain ID**: 48217 (AlphaSec L2)

## 🔐 Security

⚠️ **Important Security Notes:**

- Never commit private keys to version control
- Use environment variables or secure key management
- Always test on kairos testnet before mainnet
- Verify transaction details before signing
- Blockchain transactions are irreversible

## ⚠️ Disclaimer

This SDK is provided as-is. Trading cryptocurrencies involves substantial risk and may result in significant losses. Always do your own research and never invest more than you can afford to lose. The developers are not responsible for any trading losses incurred while using this SDK.
