Binance adapter for PULSE Protocol — trade with PULSE messages
Project description
pulse-binance
Binance adapter for PULSE Protocol.
Trade, query prices, manage orders — all through PULSE semantic messages.
Install
pip install pulse-binance
Quick Start
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
# 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pulse_binance-0.1.0.tar.gz
(7.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pulse_binance-0.1.0.tar.gz.
File metadata
- Download URL: pulse_binance-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4fddb9b132a211d1a9d3989f542ea93c63944121a01610aeb3d2547db24d2db
|
|
| MD5 |
d53e3ed51fedc78dfd351ed75b77a184
|
|
| BLAKE2b-256 |
2eb90d14b524f0124dab6c5933ad4096b4a9be66f8b9c17dc6969978a90b2d6f
|
File details
Details for the file pulse_binance-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pulse_binance-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dae5ef1511b4d398a4ea7c8f6321d20a83c54b613e6f72eaf060172db0f3f00
|
|
| MD5 |
dac9769261fbd0f84791da604b78fbd6
|
|
| BLAKE2b-256 |
e3eff83cc8a8a4a094ea0c8a65d77fd09b6526ab3d2960f98b048d16dcca4d98
|