Skip to content

v2.3.0

Choose a tag to compare

@tigusigalpa tigusigalpa released this 13 Dec 16:40
· 17 commits to main since this release

Release Notes for v2.3.0

🎉 Account & Wallet API - Complete Implementation

Version 2.3.0 brings complete coverage of BingX Account & Wallet API endpoints with 21 new methods across sub-account management and account permissions.


✨ What's New

🆕 Sub-Account Service (20 methods)

A comprehensive new service for managing sub-accounts, API keys, transfers, and deposits:

Sub-Account Management

  • createSubAccount() - Create new sub-accounts
  • getAccountUid() - Get main account UID
  • getSubAccountList() - List all sub-accounts with pagination
  • getSubAccountAssets() - Query sub-account assets
  • updateSubAccountStatus() - Enable/disable sub-accounts
  • getAllSubAccountBalances() - Get balances across all sub-accounts

API Key Management

  • createSubAccountApiKey() - Create API keys for sub-accounts
  • queryApiKey() - Query API key information
  • editSubAccountApiKey() - Edit sub-account API key permissions
  • deleteSubAccountApiKey() - Delete sub-account API keys

Transfer Operations

  • authorizeSubAccountInternalTransfer() - Authorize sub-accounts for transfers
  • subAccountInternalTransfer() - Transfer between main/sub-accounts
  • getSubAccountInternalTransferRecords() - Query transfer history
  • subAccountAssetTransfer() - Asset transfers for sub-accounts
  • getSubAccountTransferSupportedCoins() - Get supported transfer coins
  • getSubAccountAssetTransferHistory() - Query asset transfer history

Deposit Management

  • createSubAccountDepositAddress() - Create deposit addresses
  • getSubAccountDepositAddress() - Query deposit addresses
  • getSubAccountDepositHistory() - Get deposit history

📊 Account Service Enhancement

  • getAccountApiPermissions() - Query account API permissions

📈 Statistics

  • Total Methods: 207 (was 186)
  • New Methods: +21
  • Services: 12 (including new Sub-Account Service)
  • API Coverage: 100% of Account & Wallet endpoints

Service Distribution

Service Methods Status
Market Service 40 ✅
TWAP Service 7 ✅
Account Service 40 ✅ (+1)
Trade Service 54 ✅
Wallet Service 6 ✅
Spot Account Service 9 ✅
Sub-Account Service 20 🆕
Contract Service 3 ✅
Listen Key Service 3 ✅
Coin-M Market 6 ✅
Coin-M Trade 17 ✅
Coin-M Listen Key 3 ✅

💡 Usage Examples

Creating and Managing Sub-Accounts

use Tigusigalpa\BingX\Facades\Bingx;

// Create a sub-account
$result = Bingx::subAccount()->createSubAccount('trading_bot_001');

// Get all sub-accounts
$subAccounts = Bingx::subAccount()->getSubAccountList();

// Get sub-account assets
$assets = Bingx::subAccount()->getSubAccountAssets('12345678');

// Update status
Bingx::subAccount()->updateSubAccountStatus('trading_bot_001', 1); // 1: enable

API Key Management

// Create API key for sub-account
$apiKey = Bingx::subAccount()->createSubAccountApiKey(
    subAccountString: 'trading_bot_001',
    label: 'Bot API Key',
    permissions: ['spot' => true, 'futures' => true],
    ip: '192.168.1.100' // Optional IP whitelist
);

// Edit permissions
Bingx::subAccount()->editSubAccountApiKey(
    subAccountString: 'trading_bot_001',
    apiKey: 'your_api_key',
    permissions: ['spot' => false, 'futures' => true]
);

Internal Transfers

// Transfer from main to sub-account
$transfer = Bingx::subAccount()->subAccountInternalTransfer(
    coin: 'USDT',
    walletType: 'SPOT',
    amount: 100.0,
    transferType: 'FROM_MAIN_TO_SUB',
    toSubUid: '12345678'
);

// Transfer between sub-accounts
$transfer = Bingx::subAccount()->subAccountInternalTransfer(
    coin: 'USDT',
    walletType: 'PERPETUAL',
    amount: 50.0,
    transferType: 'FROM_SUB_TO_SUB',
    fromSubUid: '12345678',
    toSubUid: '87654321'
);

Deposit Management

// Create deposit address for sub-account
$address = Bingx::subAccount()->createSubAccountDepositAddress(
    coin: 'USDT',
    network: 'TRC20',
    subUid: '12345678'
);

// Get deposit history
$deposits = Bingx::subAccount()->getSubAccountDepositHistory(
    subUid: '12345678',
    coin: 'USDT',
    status: 1,
    limit: 100
);

📝 Documentation Updates

  • ✅ Complete Sub-Account Service documentation in README.md
  • ✅ Russian documentation in README-ru.md
  • ✅ Updated service statistics and method counts
  • ✅ Added comprehensive usage examples

📦 Installation

composer require tigusigalpa/bingx-php:^2.3.0
{
    "require": {
        "tigusigalpa/bingx-php": "^2.3.0"
    }
}

🐛 Bug Fixes

  • None in this release (feature-only update)

🙏 Credits

Special thanks to all contributors and users who requested sub-account management features!


📚 Resources


🔜 What's Next

  • WebSocket enhancements
  • Additional trading strategies
  • Performance optimizations

Full Changelog: v2.2.0...v2.3.0