Skip to content

Commit c638b3f

Browse files
Michael YuanMichael Yuan
authored andcommitted
Add Binance exchange support for spot/perp/options
- Binance spot orders (POST /api/v3/order) with HMAC-SHA256 signing - Binance futures orders (POST /fapi/v1/order) - Binance options orders (POST /eapi/v1/order) - Binance balance, positions, open orders, cancel - Global --exchange flag: auto|hyperliquid|binance - Auto mode: Hyperliquid for spot/perp, Binance for options - Options on Hyperliquid returns clear error (HIP-4 not ready) - Binance order IDs: binance_spot:SYMBOL:OID, binance_futures:SYMBOL:OID - Config: binance_api_key, binance_api_secret in [api_keys] - Zero clippy warnings
1 parent 748f4b1 commit c638b3f

13 files changed

Lines changed: 1331 additions & 34 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ ethers = { version = "2", default-features = false, features = ["rustls", "eip71
2626
urlencoding = "2"
2727
regex = "1"
2828
openssl = { version = "0.10", features = ["vendored"] }
29+
hmac = "0.12"
30+
sha2 = "0.10"

config.toml.default

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ testnet = false
3232
# NewsAPI key — stock news (optional, not currently used)
3333
# Free at https://newsapi.org/
3434
# newsapi_key = "..."
35+
36+
# Binance API credentials — enables spot/perp/options trading on Binance
37+
# Sign up at https://www.binance.com/
38+
# binance_api_key = "..."
39+
# binance_api_secret = "..."

0 commit comments

Comments
 (0)