Releases: tigusigalpa/bingx-php
v2.5.51
v2.5.5
BingX PHP SDK v2.5.5 Release Notes
Release Date: March 15, 2026
Overview
This release brings significant updates to the BingX PHP SDK to support the latest API changes introduced by BingX between December 2025 and February 2026. The update focuses on enhanced market data endpoints, improved internal transfer capabilities, and new sub-mother account management features.
🎯 What's New
Market Service Enhancements
Spot Symbols Endpoint Update
- Updated endpoint:
getSpotSymbols()now uses/openApi/spot/v1/common/symbols - New field:
maxMarketNotional- Maximum notional amount allowed for a single market order - New status value:
29 = Pre-Delisted- Indicates symbols scheduled for delisting - Complete status values:
0= Offline1= Online5= Pre-open10= Accessed25= Suspended29= Pre-Delisted ⭐ NEW30= Delisted
Spot Klines v2 Endpoint
- Updated endpoint:
getSpotKlines()now uses/openApi/spot/v2/market/kline - New parameter:
timeZone- Optional timezone offset0= UTC (default)8= UTC+8
- Increased limit: Maximum records increased from 1000 to 1440
Example:
$spotKlines = Bingx::market()->getSpotKlines(
'BTC-USDT', '1h', 100,
strtotime('2024-01-01') * 1000,
strtotime('2024-01-02') * 1000,
8 // UTC+8 timezone
);Spot Account Service Updates
Internal Transfer Modernization
The internalTransfer() method has been completely updated with new parameters for enhanced flexibility:
New Parameters:
walletType(integer): Now supports Spot Account type1= Fund Account2= Standard Futures Account3= Perpetual Futures Account4= Spot Account ⭐ NEW
userAccountType(integer): Account identifier type1= UID2= Phone number3= Email
userAccount(string): The actual account identifiercallingCode(string, optional): Phone area code (required when userAccountType=2)transferClientId(string, optional): Custom transfer ID (max 100 characters)recvWindow(integer, optional): Request validity time window in milliseconds
Example:
$internalTransfer = Bingx::spotAccount()->internalTransfer(
coin: 'USDT',
walletType: 4, // Spot Account
amount: 50.0,
userAccountType: 1, // UID
userAccount: '123456',
callingCode: null,
transferClientId: 'transfer-001',
recvWindow: null
);Sub-Account Service Enhancements
Sub-Account Internal Transfer Update
The subAccountInternalTransfer() method now supports Spot Account wallet type:
Updated Parameters:
walletType(integer): Now includes Spot Account for sub-accounts1= Fund Account2= Standard Futures Account3= Perpetual Futures Account15= Spot Account ⭐ NEW (Note: Different value from main account)
- Additional parameters match the main account internal transfer
Example:
$transfer = Bingx::subAccount()->subAccountInternalTransfer(
coin: 'USDT',
walletType: 15, // Spot Account for sub-accounts
amount: 100.0,
userAccountType: 1,
userAccount: '12345678',
callingCode: null,
transferClientId: 'transfer-001',
recvWindow: null
);New Sub-Mother Account Methods
Three powerful new methods for master account holders to manage transfers between parent and sub-accounts:
1. subMotherAccountAssetTransfer()
Flexible asset transfer between parent and sub-accounts with full control over account types.
Parameters:
assetName: Asset to transfer (e.g., "USDT")transferAmount: Amount to transferfromUid: Payer UIDfromType: Payer type (1=Parent, 2=Sub-account)fromAccountType: Source account type (1=Funding, 2=Standard futures, 3=Perpetual, 15=Spot)toUid: Receiver UIDtoType: Receiver type (1=Parent, 2=Sub-account)toAccountType: Destination account typeremark: Transfer remarksrecvWindow: Optional execution window
Returns: Transfer record ID (tranId)
Example:
$transfer = Bingx::subAccount()->subMotherAccountAssetTransfer(
assetName: 'USDT',
transferAmount: 100.0,
fromUid: 123456,
fromType: 1, // Parent account
fromAccountType: 1, // Funding
toUid: 789012,
toType: 2, // Sub-account
toAccountType: 15, // Spot account
remark: 'Transfer to sub-account',
recvWindow: null
);2. getSubMotherAccountTransferableAmount()
Query supported coins and available transferable amounts between accounts.
Parameters:
fromUid: Payer UIDfromAccountType: Source account typetoUid: Receiver UIDtoAccountType: Destination account typerecvWindow: Optional execution window
Returns: Array of coins with id, name, and availableAmount
Example:
$transferable = Bingx::subAccount()->getSubMotherAccountTransferableAmount(
fromUid: 123456,
fromAccountType: 1,
toUid: 789012,
toAccountType: 15,
recvWindow: null
);3. getSubMotherAccountTransferHistory()
Query transfer history between sub-accounts and parent account with advanced filtering.
Parameters:
uid: UID to querytype: Transfer type filter (optional)tranId: Transfer ID filter (optional)startTime: Start time in milliseconds (optional)endTime: End time in milliseconds (optional)pageId: Current page (default 1)pagingSize: Page size (default 10, max 100)recvWindow: Optional execution window
Returns: Total count and rows array with transfer history
Example:
$history = Bingx::subAccount()->getSubMotherAccountTransferHistory(
uid: 123456,
type: null,
tranId: null,
startTime: strtotime('-7 days') * 1000,
endTime: time() * 1000,
pageId: 1,
pagingSize: 50,
recvWindow: null
);🔄 Changed
- Updated BingX API integration to support changes from December 2025 through February 2026
- Improved parameter validation and type safety across all updated methods
- Enhanced documentation with detailed parameter descriptions and examples
⚠️ Breaking Changes
Method Signature Changes
The following methods have updated signatures that may require code changes:
internalTransfer()- New required parameters and parameter typessubAccountInternalTransfer()- New required parameters and parameter types
Migration Guide:
Old Code:
$transfer = Bingx::spotAccount()->internalTransfer(
coin: 'USDT',
walletType: 'SPOT',
amount: 50.0,
transferType: 'FROM_MAIN_TO_SUB',
subUid: '123456'
);New Code:
$transfer = Bingx::spotAccount()->internalTransfer(
coin: 'USDT',
walletType: 4, // Integer instead of string
amount: 50.0,
userAccountType: 1, // New parameter
userAccount: '123456', // New parameter
callingCode: null,
transferClientId: null,
recvWindow: null
);🔐 API Compatibility
- All changes maintain backward compatibility where possible
- New optional parameters added with sensible defaults
- Existing method signatures preserved for non-breaking changes
- Full support for all BingX API v3 endpoints
📚 Documentation
- Updated README with comprehensive examples for all new features
- Added CHANGELOG.md with detailed change history
- Enhanced inline documentation for all updated methods
🔗 Resources
- API Documentation: https://bingx-api.github.io/docs-v3/
- GitHub Repository: https://github.com/tigusigalpa/bingx-php
- Support: Open an issue on GitHub for questions or bug reports
🙏 Acknowledgments
Thank you to all contributors and users who provided feedback for this release. Special thanks to the BingX API team for their comprehensive API documentation.
Installation & Upgrade
New Installation
composer require tigusigalpa/bingx-php:^2.5.5Upgrade from Previous Version
composer update tigusigalpa/bingx-phpNote: Please review the breaking changes section above before upgrading to ensure compatibility with your existing code.
Full Changelog: See CHANGELOG.md for complete details.
v2.4.0
Release Notes for v2.4.0
🎉 Copy Trading API - Complete Implementation
Version 2.4.0 introduces full support for BingX Copy Trading API with 13 new methods for both perpetual futures and spot trading.
✨ What's New
🆕 Copy Trading Service (13 methods)
A comprehensive new service for copy trading operations across perpetual futures and spot markets:
Perpetual Futures Copy Trading (8 methods)
getCurrentTrackOrders()- Query current track orders for perpetual futurescloseTrackOrder()- Close positions by order numbersetTPSL()- Set take profit and stop loss for positionsgetTraderDetail()- Get personal trading overviewgetProfitSummary()- Query profit summarygetProfitDetail()- Get detailed profit information with paginationsetCommission()- Set commission rate for copy tradinggetTradingPairs()- Get available copy trading pairs
Spot Copy Trading (5 methods)
sellSpotOrder()- Sell spot assets based on buy order numbergetSpotTraderDetail()- Get spot trading overviewgetSpotProfitSummary()- Query spot profit summarygetSpotProfitDetail()- Get detailed spot profit informationgetSpotHistoryOrders()- Query historical spot orders
📈 Statistics
- Total Methods: 220 (was 207)
- New Methods: +13
- Services: 13 (including new Copy Trading Service)
- API Coverage: 100% of Copy Trading endpoints
Service Distribution
| Service | Methods | Status |
|---|---|---|
| Market Service | 40 | ✅ |
| TWAP Service | 7 | ✅ |
| Account Service | 40 | ✅ |
| Trade Service | 54 | ✅ |
| Wallet Service | 6 | ✅ |
| Spot Account Service | 9 | ✅ |
| Sub-Account Service | 20 | ✅ |
| Copy Trading Service | 13 | 🆕 |
| Contract Service | 3 | ✅ |
| Listen Key Service | 3 | ✅ |
| Coin-M Market | 6 | ✅ |
| Coin-M Trade | 17 | ✅ |
| Coin-M Listen Key | 3 | ✅ |
💡 Usage Examples
Perpetual Futures Copy Trading
use Tigusigalpa\BingX\Facades\Bingx;
// Get current track orders
$orders = Bingx::copyTrading()->getCurrentTrackOrders('BTC-USDT');
// Close position by order number
$result = Bingx::copyTrading()->closeTrackOrder('1252864099381234567');
// Set take profit and stop loss
Bingx::copyTrading()->setTPSL(
positionId: '1252864099381234567',
stopLoss: 48000.0,
takeProfit: 52000.0
);
// Get trader details
$details = Bingx::copyTrading()->getTraderDetail();
// Get profit summary
$summary = Bingx::copyTrading()->getProfitSummary();
// Get profit details with pagination
$profits = Bingx::copyTrading()->getProfitDetail(
pageIndex: 1,
pageSize: 20
);
// Set commission rate
Bingx::copyTrading()->setCommission(5.0); // 5% commission
// Get available trading pairs
$pairs = Bingx::copyTrading()->getTradingPairs();Spot Copy Trading
// Sell spot order based on buy order ID
$result = Bingx::copyTrading()->sellSpotOrder('1253517936071234567');
// Get spot trader details
$details = Bingx::copyTrading()->getSpotTraderDetail();
// Get spot profit summary
$summary = Bingx::copyTrading()->getSpotProfitSummary();
// Get spot profit details
$profits = Bingx::copyTrading()->getSpotProfitDetail(
pageIndex: 1,
pageSize: 20
);
// Query historical spot orders
$history = Bingx::copyTrading()->getSpotHistoryOrders(
pageIndex: 1,
pageSize: 50
);📝 Documentation Updates
- ✅ Complete Copy Trading Service documentation in
README.md - ✅ Russian documentation in
README-ru.md - ✅ Updated service statistics and method counts
- ✅ Added comprehensive usage examples for both futures and spot
🔧 Technical Details
New Files
src/Services/CopyTradingService.php- Complete copy trading implementation
Modified Files
src/BingxClient.php- IntegratedCopyTradingServiceREADME.md- Added Copy Trading Service documentationREADME-ru.md- Added Russian documentation
📦 Installation
composer require tigusigalpa/bingx-php:^2.4.0Or update your composer.json:
{
"require": {
"tigusigalpa/bingx-php": "^2.4.0"
}
}🔄 Upgrade Guide
From v2.3.x to v2.4.0
This is a non-breaking release. All existing code will continue to work without modifications.
New features available:
- Access copy trading operations via Bingx::copyTrading()
- Full support for perpetual futures and spot copy trading
- Manage positions, profits, and commissions programmatically
No migration steps required.
🐛 Bug Fixes
- None in this release (feature-only update)
🙏 Credits
Special thanks to all contributors and users who requested copy trading features!
📚 Resources
- Documentation: See
README.mdin the repository - API Reference: https://bingx-api.github.io/docs/
- Issues: https://github.com/tigusigalpa/bingx-php/issues
- Discussions: https://github.com/tigusigalpa/bingx-php/discussions
🔜 What's Next
- Additional copy trading features
- Enhanced follower management
- Performance optimizations
Full Changelog: v2.3.0...v2.4.0
v2.3.0
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-accountsgetAccountUid()- Get main account UIDgetSubAccountList()- List all sub-accounts with paginationgetSubAccountAssets()- Query sub-account assetsupdateSubAccountStatus()- Enable/disable sub-accountsgetAllSubAccountBalances()- Get balances across all sub-accounts
API Key Management
createSubAccountApiKey()- Create API keys for sub-accountsqueryApiKey()- Query API key informationeditSubAccountApiKey()- Edit sub-account API key permissionsdeleteSubAccountApiKey()- Delete sub-account API keys
Transfer Operations
authorizeSubAccountInternalTransfer()- Authorize sub-accounts for transferssubAccountInternalTransfer()- Transfer between main/sub-accountsgetSubAccountInternalTransferRecords()- Query transfer historysubAccountAssetTransfer()- Asset transfers for sub-accountsgetSubAccountTransferSupportedCoins()- Get supported transfer coinsgetSubAccountAssetTransferHistory()- Query asset transfer history
Deposit Management
createSubAccountDepositAddress()- Create deposit addressesgetSubAccountDepositAddress()- Query deposit addressesgetSubAccountDepositHistory()- 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: enableAPI 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
- Documentation: README.md
- API Reference: https://bingx-api.github.io/docs/
- Issues: https://github.com/tigusigalpa/bingx-php/issues
- Discussions: https://github.com/tigusigalpa/bingx-php/discussions
🔜 What's Next
- WebSocket enhancements
- Additional trading strategies
- Performance optimizations
Full Changelog: v2.2.0...v2.3.0
v2.2.1
Вот текст для Release Notes на GitHub для версии 2.2.0:
🚀 Release v2.2.0 - Coin-M Perpetual Futures Support
🆕 New Features
Coin-M Perpetual Futures API
Added complete support for Coin-M (crypto-margined) perpetual futures contracts with 26 new methods:
🔧 Integration
Access Coin-M API through the main client:
// Laravel
$ticker = Bingx::coinM()->market()->getTicker('BTC-USD');
$balance = Bingx::coinM()->trade()->getBalance();
// Pure PHP
$bingx = new BingxClient($http);
$contracts = $bingx->coinM()->market()->getContracts();📊 Key Differences: USDT-M vs Coin-M
| Feature | USDT-M | Coin-M |
|---|---|---|
| Margin | USDT (stablecoin) | Cryptocurrency (BTC, ETH) |
| Settlement | USDT | Base cryptocurrency |
| API Path | /openApi/swap/v2/ |
/openApi/cswap/v1/ |
| Symbols | BTC-USDT | BTC-USD, ETH-USD |
📈 Statistics
- Total methods: 186 (160 → 186)
- USDT-M services: 8 services, 160 methods
- Coin-M services: 3 services, 26 methods
- API coverage: 100%
📚 Documentation
- Comprehensive examples for all Coin-M methods
- Updated API coverage tables
- Detailed PHPDoc for all new methods
🔗 Use Cases
Perfect for:
- Hedging crypto holdings without converting to stablecoins
- Earning yield in base cryptocurrency
- Avoiding stablecoin regulatory risks
- Long-term crypto holders
⚠️ Breaking Changes
None - fully backward compatible with v2.1.0
🙏 Acknowledgments
Thanks to all contributors and users who requested Coin-M support!
v0.2.2
Full Changelog: v0.1.0...v0.2.2
v0.1.0
First public alpha release of tigusigalpa/bingx-php — a PHP client for BingX Swap V2 API with optional Laravel integration.
✨ Features
- Base HTTP client with HMAC-SHA256 signing, configurable base URI and signature encoding, automatic
timestamp. - Modular services:
- MarketService – symbols, prices, depth, klines, funding, mark price.
- AccountService – balance, positions, account info, fees, margin, leverage helpers.
- TradeService – create/cancel orders, batch orders, order & user history, user trades.
- Advanced OrderBuilder:
- Spot & futures, margin size, leverage, LONG/SHORT/BOTH.
- Stop-loss / take-profit (price and %), test orders.
- Built‑in validation of required fields and combinations.
- Commission & leverage utilities:
- Futures fee calculator (0.045% standard rate).
- Batch commission helpers.
- Correct Set/Get Leverage implementation per BingX docs.
- Laravel 8–12 integration:
- Service provider +
Bingxfacade. - Publishable
config/bingx.php. - Ready for DI via BingxClient.
- Service provider +
- Documentation:
- README with Laravel and plain PHP usage,
- Market/Account/Trade examples,
- OrderBuilder patterns, cancellation, leverage and commission examples.