Skip to content

Releases: tigusigalpa/bingx-python

v1.1.51

15 Mar 09:20

Choose a tag to compare

v1.1.5

15 Mar 07:49

Choose a tag to compare

Release Notes - BingX Python SDK v1.1.5

Release Date: March 15, 2026

Overview

This release updates the BingX Python SDK to support the latest API changes from BingX, including enhanced spot market data endpoints, improved internal transfer functionality with new wallet types, and powerful new sub-mother account management features.


🎯 What's New

Market Service Enhancements

Updated Spot Symbols Endpoint

  • Endpoint Update: get_spot_symbols() now uses /openApi/spot/v1/common/symbols
  • New Field: Added maxMarketNotional - maximum notional amount for a single market order
  • New Status Value: Added status 29 = Pre-Delisted for symbols approaching delisting
  • Complete Status Values:
    • 0 = Offline
    • 1 = Online
    • 5 = Pre-open
    • 10 = Accessed
    • 25 = Suspended
    • 29 = Pre-Delisted (NEW)
    • 30 = Delisted

Spot Klines v2 with Timezone Support

  • Endpoint Update: get_spot_klines() now uses /openApi/spot/v2/market/kline
  • New Parameter: time_zone - Optional timezone offset
    • 0 = UTC (default)
    • 8 = UTC+8
  • Increased Limit: Maximum records increased from 1000 to 1440

Example:

# Get klines in UTC+8 timezone
spot_klines = client.market().get_spot_klines(
    "BTC-USDT", "1h", 100, 
    start_time=start_ts, 
    end_time=end_ts, 
    time_zone=8
)

Spot Account Service Updates

Enhanced Internal Transfer

  • Breaking Change: Updated internal_transfer() method signature

  • New Wallet Type: Added support for wallet_type=4 (Spot Account)

  • Complete Wallet Types:

    • 1 = Fund Account
    • 2 = Standard Futures Account
    • 3 = Perpetual Futures Account
    • 4 = Spot Account (NEW)
  • New Parameters:

    • user_account_type: Account identifier type (1=UID, 2=Phone number, 3=Email)
    • user_account: User account identifier
    • calling_code: Phone area code (required when user_account_type=2)
    • transfer_client_id: Custom transfer ID (optional, max 100 chars)
    • recv_window: Request validity time window in milliseconds

Example:

transfer = client.spot_account().internal_transfer(
    coin="USDT",
    wallet_type=4,  # Spot Account
    amount=100.0,
    user_account_type=1,  # UID
    user_account="123456",
    transfer_client_id="transfer-001"
)

Sub-Account Service Enhancements

Updated Sub-Account Internal Transfer

  • Breaking Change: Updated sub_account_internal_transfer() method signature

  • New Wallet Type: Added support for wallet_type=15 (Spot Account)

  • Complete Wallet Types for Sub-Accounts:

    • 1 = Fund Account
    • 2 = Standard Futures Account
    • 3 = Perpetual Futures Account
    • 15 = Spot Account (NEW)
  • New Parameters: Same as main account internal transfer (see above)

Example:

transfer = client.sub_account().sub_account_internal_transfer(
    coin="USDT",
    wallet_type=15,  # Spot Account
    amount=100.0,
    user_account_type=1,
    user_account="12345678"
)

New Method: Sub-Mother Account Asset Transfer

sub_mother_account_asset_transfer() - Master account only

Enables flexible asset transfers between parent and sub-accounts with granular control over account types.

Features:

  • Transfer between any combination of parent/sub-accounts
  • Support for multiple account types (Funding, Standard futures, Perpetual U-based, Spot)
  • Returns tranId for tracking transfer records

Parameters:

  • asset_name: Asset to transfer (e.g., "USDT")
  • transfer_amount: Amount to transfer
  • from_uid: Payer UID
  • from_type: 1=Parent account, 2=Sub-account
  • from_account_type: 1=Funding, 2=Standard futures, 3=Perpetual U-based, 15=Spot
  • to_uid: Receiver UID
  • to_type: 1=Parent account, 2=Sub-account
  • to_account_type: Account type (same values as from_account_type)
  • remark: Transfer description
  • recv_window: Optional execution window time

Example:

transfer = client.sub_account().sub_mother_account_asset_transfer(
    asset_name="USDT",
    transfer_amount=100.0,
    from_uid=123456,
    from_type=1,  # Parent account
    from_account_type=1,  # Funding
    to_uid=789012,
    to_type=2,  # Sub-account
    to_account_type=15,  # Spot
    remark="Transfer to sub-account"
)

New Method: Query Transferable Amount

get_sub_mother_account_transferable_amount() - Master account only

Query supported coins and available transferable amounts between accounts.

Returns: Array of coins with id, name, and availableAmount

Example:

transferable = client.sub_account().get_sub_mother_account_transferable_amount(
    from_uid=123456,
    from_account_type=1,  # Funding
    to_uid=789012,
    to_account_type=15  # Spot
)

New Method: Query Transfer History

get_sub_mother_account_transfer_history() - Master account only

Query transfer history between sub-accounts and parent account with advanced filtering.

Features:

  • Filter by transfer type, transaction ID, time range
  • Pagination support
  • Returns total count and detailed transfer records

Example:

history = client.sub_account().get_sub_mother_account_transfer_history(
    uid=123456,
    type_=None,  # Optional filter
    tran_id=None,  # Optional filter
    start_time=start_ts,
    end_time=end_ts,
    page_id=1,
    paging_size=50
)

🔄 Breaking Changes

Method Signature Changes

  1. spot_account.internal_transfer()

    • Old signature: (coin, wallet_type, amount, transfer_type, sub_uid, ...)
    • New signature: (coin, wallet_type, amount, user_account_type, user_account, ...)
    • Migration: Replace transfer_type and sub_uid with user_account_type and user_account
  2. sub_account.sub_account_internal_transfer()

    • Old signature: (coin, wallet_type, amount, transfer_type, to_sub_uid, ...)
    • New signature: (coin, wallet_type, amount, user_account_type, user_account, ...)
    • Migration: Replace transfer_type and to_sub_uid with user_account_type and user_account

Wallet Type Values

  • Spot Account Service: Use wallet_type=4 for Spot Account (previously used string values)
  • Sub-Account Service: Use wallet_type=15 for Spot Account (different from main account)

📝 API Endpoint Changes

Service Method Old Endpoint New Endpoint
Market get_spot_klines() /openApi/spot/v1/market/kline /openApi/spot/v2/market/kline
Spot Account internal_transfer() Various /openApi/wallets/v1/capital/innerTransfer/apply
Sub-Account sub_account_internal_transfer() Various /openApi/wallets/v1/capital/subAccountInnerTransfer/apply
Sub-Account sub_mother_account_asset_transfer() N/A (NEW) /openApi/account/transfer/v1/subAccount/transferAsset
Sub-Account get_sub_mother_account_transferable_amount() N/A (NEW) /openApi/account/transfer/v1/subAccount/transferAsset/supportCoins
Sub-Account get_sub_mother_account_transfer_history() N/A (NEW) /openApi/account/transfer/v1/subAccount/asset/transferHistory

🔧 Migration Guide

Updating Internal Transfers

Before (v1.0.x):

transfer = client.spot_account().internal_transfer(
    coin="USDT",
    wallet_type="SPOT",
    amount=50.0,
    transfer_type="FROM_MAIN_TO_SUB",
    sub_uid="123456"
)

After (v1.1.5):

transfer = client.spot_account().internal_transfer(
    coin="USDT",
    wallet_type=4,  # Spot Account
    amount=50.0,
    user_account_type=1,  # UID
    user_account="123456"
)

Updating Sub-Account Transfers

Before (v1.0.x):

transfer = client.sub_account().sub_account_internal_transfer(
    coin="USDT",
    wallet_type="SPOT",
    amount=100.0,
    transfer_type="FROM_MAIN_TO_SUB",
    to_sub_uid="12345678"
)

After (v1.1.5):

transfer = client.sub_account().sub_account_internal_transfer(
    coin="USDT",
    wallet_type=15,  # Spot Account
    amount=100.0,
    user_account_type=1,  # UID
    user_account="12345678"
)

📚 Documentation Updates

  • Updated README with new method examples
  • Added CHANGELOG.md with detailed change history
  • Updated inline documentation for all modified methods
  • Added type hints for better IDE support

📦 Installation

pip install --upgrade bingx-python

Or update your requirements.txt:

bingx-python==1.1.5

🔗 Resources


🙏 Acknowledgments

This release implements API changes announced by BingX between December 2025 and February 2026, ensuring the SDK remains fully compatible with the latest platform features.


Full Changelog: v1.0.0...v1.1.5

v1.0.0

09 Mar 07:48

Choose a tag to compare

v1.0.0

Initial release.

USDT-M Perpetual Futures

  • Market Service — 40 methods: symbols, prices, depth, klines, funding rates, mark price, premium index, aggregate trades, long/short ratio, basis, Quote API
  • Account Service — 25 methods: balance, positions, leverage, margin mode, position margin, fees, permissions
  • Trade Service — 30 methods: create/cancel/replace orders, batch orders, test orders, order history, user trades, position mode, quick trade methods (spot market/limit, futures long/short)
  • Wallet Service — deposits, withdrawals, deposit addresses, coin info
  • Spot Account Service — spot balance, fund balance, universal transfers, internal transfers
  • Sub-Account Service — 20 methods: create/manage sub-accounts, API key management, transfers, deposit addresses
  • Copy Trading Service — 13 methods: track orders, TP/SL, trader details, profit summary, commission, spot copy trading
  • Contract Service — positions, orders, balance for standard contracts
  • Listen Key Service — generate, extend, delete WebSocket listen keys

Coin-M Perpetual Futures

  • Market — contracts, ticker, depth, klines, open interest, funding rate
  • Trade — orders, positions, balance, leverage, margin mode, order/trade history, income, commission rate
  • Listen Key — generate, extend, delete

WebSocket

  • MarketDataStream — subscribe to trades, klines, depth, ticker, book ticker
  • AccountDataStream — balance, position, order updates via listen key

Core

  • HMAC-SHA256 request signing (base64 / hex)
  • Automatic timestamp and recvWindow
  • Exception hierarchy: BingXException, APIException, AuthenticationException, RateLimitException, InsufficientBalanceException
  • Type hints
  • Python 3.8+