Metadata-Version: 2.4
Name: pulse-binance
Version: 0.1.0
Summary: Binance adapter for PULSE Protocol — trade with PULSE messages
Author-email: PULSE Protocol Team <pulse@protocol.org>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/pulseprotocolorg-cyber/pulse-binance
Project-URL: Repository, https://github.com/pulseprotocolorg-cyber/pulse-binance
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pulse-protocol>=0.5.0
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"

# pulse-binance

Binance adapter for [PULSE Protocol](https://github.com/pulseprotocolorg-cyber/pulse-python).

Trade, query prices, manage orders — all through PULSE semantic messages.

## Install

```bash
pip install pulse-binance
```

## Quick Start

```python
from pulse import PulseMessage
from pulse_binance import BinanceAdapter

adapter = BinanceAdapter(api_key="...", api_secret="...")

# Get BTC price
msg = PulseMessage(
    action="ACT.QUERY.DATA",
    parameters={"symbol": "BTCUSDT"}
)
response = adapter.send(msg)
print(response.content["parameters"]["result"]["price"])

# Place a market buy order
msg = PulseMessage(
    action="ACT.TRANSACT.REQUEST",
    parameters={"symbol": "BTCUSDT", "side": "BUY", "quantity": 0.001}
)
response = adapter.send(msg)
print(response.content["parameters"]["result"]["status"])
```

## Supported Actions

| PULSE Action | What it does |
|---|---|
| `ACT.QUERY.DATA` | Get price, 24h stats, klines, order book |
| `ACT.TRANSACT.REQUEST` | Place order (MARKET/LIMIT, BUY/SELL) |
| `ACT.CANCEL` | Cancel an order |
| `ACT.QUERY.STATUS` | Check order status |
| `ACT.QUERY.LIST` | List open orders |
| `ACT.QUERY.BALANCE` | Get account balances |

## Switch Exchanges in One Line

```python
# from pulse_binance import BinanceAdapter as Exchange
from pulse_bybit import BybitAdapter as Exchange

adapter = Exchange(api_key="...", api_secret="...")
# Everything else stays the same
```

## License

Apache 2.0
