Changelog
From 5.0.0 on, every package has its own version and changelog: see src/<package>/CHANGELOG.md (for example
src/Binance.Spot/CHANGELOG.md). This file keeps the 5.0.0 release and the 4.x history.
5.0.0 - 2026-11-27
A new major version, replacing the single 4.x Binance.Spot package with one package per Binance product, with typed REST API,
WebSocket API and WebSocket Streams clients. Signing, retries and reconnects are built in. See MIGRATION.md.
Added (13)
- One package per product (
Binance.Spot,Binance.Wallet,Binance.DerivativesTradingUsdsFutures, ...), each with typed REST API, WebSocket API and WebSocket Streams clients, tests, and a runnable example for every endpoint. Binance.Common: configuration (proxies, retries, timeouts, compression, keep-alive, custom headers, HMAC / RSA / Ed25519 keys, time unit, reconnect settings), a typed exception hierarchy (BinanceExceptionand subclasses), rate limit counters (RestApiRateLimit,WebSocketApiRateLimit), connection lifecycle events,ILoggerintegration and extensible enums.Binance.Common.DependencyInjection:AddBinanceRestApi,AddBinanceWebSocketApiandAddBinanceWebSocketStreams.- Factories for every environment of a product (
Production,Testnet,Demowhere it exists) andFromConfig. - WebSocket API and WebSocket Streams clients hold the configuration, and
ConnectAsync()returns an open connection with the methods, as in the other Binance connectors.WebSocketMode.Single(default) orWebSocketMode.Pool(n), in the configuration or given toConnectAsync, spreads requests or streams over a pool of connections. - Responses decode their body or result with
Data(), on first use. - Subscriptions deliver their events to a
ChannelReader<T>(Events) or toOnMessagecallbacks; connections deliver their lifecycle events toEventsorOnEventcallbacks, and every message withEnableMessages()orOnMessage.WaitSubscribedAsync()completes once the server has acknowledged a subscription;Unsubscribe()ends it. - Errors carry what came with them:
Body,HeadersandRateLimitsof a REST error, andWebSocketRateLimitsandErrorData(theerror.dataof the answer) of a WebSocket API error. HTTP 409 is aBinanceConflictException. TimeOffsetandTimestampProvideron every configuration, for thetimestampof signed requests.- TLS options:
CaFile,CaPemandCaOnlyfor private CAs,ServerCertificateValidatorfor certificate pinning, and client certificates (ClientCertificatePem/ClientCertificateFilewithClientKeyPem/ClientKeyFileandClientKeyPassphrase) for mutual TLS. - Proxies: HTTP, HTTPS,
socks5andsocks5h. - For what has no generated method yet:
SendRequestAsync/SendSignedRequestAsync(REST),SendMessageAsync/SendSignedMessageAsync(WebSocket API),Subscribe(stream)andSubscribe/Unsubscribeof stream names (WebSocket Streams), plusIsSubscribedandConnectAsync(streams). - Platform libraries for
win-x64,win-x86,win-arm64,linux-x64,linux-arm64,linux-arm,linux-musl-x64,linux-musl-arm64,osx-x64andosx-arm64; the packages target net8.0 and net10.0, and trimming and Native AOT are supported.
Changed (7)
- Clients are created per product from a configuration (
SpotRestApi.Production(config),.Testnet(config), ...), instead of one class per group of endpoints (Market,SpotAccountTrade, ...) built with a base URL and keys. - Requests are typed
<Operation>Requestclasses instead of positional arguments, and responses are typed models (RestApiResponse<T>withData(),Status,RateLimitsandHeaders) instead of the response body as a string. Amounts that the API documents as numbers aredecimal, 64-bit ids arelong. - Enums are string-backed structs that also carry values the SDK does not know, instead of C# enums.
- WebSocket Streams have one method per stream, and their events are read from a
ChannelReader<T>orOnMessagecallbacks instead of anOnMessageReceivedcallback. Connections reconnect and renew on their own. - Errors are one exception hierarchy,
BinanceException, with a subclass per cause (BinanceBadRequestException,BinanceTooManyRequestsException,BinanceWebSocketNotConnectedException, ...).BinanceServerExceptionis an HTTP 5xx answer;BinanceClientException, an HTTP 4xx answer in 4.x, is now an unexpected status or a response that does not decode. - Asynchronous calls take a
CancellationToken; durations areTimeSpanvalues; logging is configured once withBinanceLogging.Configure(loggerFactory). - The packages target net8.0 and net10.0 instead of netstandard2.0, support trimming and Native AOT, and ship the platform library
for
win-x64,win-x86,win-arm64,linux-x64,linux-arm64,linux-arm,linux-musl-x64,linux-musl-arm64,osx-x64andosx-arm64. .NET Framework and Unity applications should stay on 4.x.
Removed (1)
- The 4.x connector (
Binance.Spot4.1.0 withMarket,SpotAccountTrade, ..., its bundled common code and the F# examples). It remains on thelegacybranch.
4.1.0 - 2024-06-18
Added (1)
- New endpoints for Margin:
POST /sapi/v1/margin/borrow-repay: Margin account borrow/repayGET /sapi/v1/margin/borrow-repay: Query borrow/repay records in Margin account
Changed (2)
- Updated dependencies versions:
Microsoft.Extensions.Loggingto8.0.0Microsoft.Extensions.Logging.Consoleto8.0.0Microsoft.Extensions.Logging.Abstractionsto8.0.1BouncyCastle.Cryptographto2.3.1
- Margin:
GET /sapi/v1/margin/transfer: add parameterisolatedSymbolGET /sapi/v1/margin/allAssets: add parameterassetGET /sapi/v1/margin/allPairs: add parametersymbolGET /sapi/v1/margin/isolated/allPairs: add parametersymbol
Removed (3)
Bswap
GET /sapi/v1/bswap/poolsGET /sapi/v1/bswap/liquidityPOST /sapi/v1/bswap/liquidityAddPOST /sapi/v1/bswap/liquidityRemoveGET /sapi/v1/bswap/liquidityOpsGET /sapi/v1/bswap/quotePOST /sapi/v1/bswap/swapGET /sapi/v1/bswap/swapGET /sapi/v1/bswap/poolConfigureGET /sapi/v1/bswap/addLiquidityPreviewGET /sapi/v1/bswap/removeLiquidityPreviewGET /sapi/v1/bswap/unclaimedRewardsPOST /sapi/v1/bswap/claimRewardsGET /sapi/v1/bswap/claimedHistory
Margin
GET /sapi/v1/margin/isolated/pairPOST /sapi/v1/margin/isolated/transferGET /sapi/v1/margin/isolated/transferGET /sapi/v1/margin/assetPOST /sapi/v1/margin/loanGET /sapi/v1/margin/dribbletGET /sapi/v1/margin/loanGET /sapi/v1/margin/pairPOST /sapi/v1/margin/repayGET /sapi/v1/margin/repayPOST /sapi/v1/margin/transfer
Staking
GET /sapi/v1/staking/productListPOST /sapi/v1/staking/purchasePOST /sapi/v1/staking/redeemGET /sapi/v1/staking/positionGET /sapi/v1/staking/stakingRecordPOST /sapi/v1/staking/setAutoStakingGET /sapi/v1/staking/personalLeftQuota
4.0.1 - 2023-10-04
Changed (1)
- Fix parameter type issue in method
AggregateTradesListAsync,KlinesAsyncandUiKlinesAsync
4.0.0 - 2023-06-28
Added (1)
- Added User-Agent
4.0.0-rc1 - 2023-04-27
Added (2)
- Added WebSocket API support.
- Added new Models
SelfTradePreventionModeandTickerType.
Changed (3)
- Updated
MarketDataWebSocket.csandUserDataWebSocket.cspath to be underWebSocketStream. - Updated
IntervalModel withONE_SECOND. - Updated dependencies versions:
Microsoft.Extensions.Loggingto6.0.0.Microsoft.Extensions.Logging.Consoleto6.0.0.Microsoft.Extensions.Logging.Abstractionsto6.0.0.Microsoft.NET.Test.Sdkto17.5.0.
3.0.0 - 2023-03-29
Removed (1)
- End of compatibility verification for .NET
3.1.xand5.0.xdue to these versions reaching their end of life.
Changed (2)
- Replaced
BouncyCastlecryptographic package toBouncyCastle.Cryptography. - Updated Examples and Tests project file to
net6.0.
2.0.0 - 2022-11-22
Added (1)
- Add RSA Key signature
1.8.0 - 2022-10-11
Added (1)
- New endpoint for Portfolio Margin:
GET /sapi/v1/portfolio/pmLoanto query Portfolio Margin Bankruptcy Loan Record.POST /sapi/v1/portfolio/repayto repay Portfolio Margin Bankruptcy Loan.GET /sapi/v1/portfolio/collateralRateto get Portfolio Margin Collateral Rate.
Changed (3)
- Changed endpoints for Trade:
POST /api/v3/order/testNew optional fieldsstrategyIdandstrategyType.POST /api/v3/orderNew optional fieldsstrategyIdandstrategyType.POST /api/v3/order/cancelReplaceNew optional fieldsstrategyIdandstrategyType.POST /api/v3/order/ocoNew optional fieldslimitStrategyId,limitStrategyType,stopStrategyIdandstopStrategyType.
- Fixing null value appended in the stream
- Update WebSocket example code
1.7.0 - 2022-07-19
Added (2)
New endpoint for Margin:
POST /sapi/v3/asset/getUserAssetto get user assets.
New endpoint for Wallet:
GET /sapi/v1/margin/dribbletto query the historical information of user's margin account small-value asset conversion BNB.
Changed (1)
- Update endpoint for Convert:
GET /sapi/v1/fiat/orders: Weight changes from IP(3000) to IP(100)
1.6.0 - 2022-07-04
Added (2)
New endpoint for Market:
GET /api/v3/tickerfor rolling window price change statistics based on windowSize provided.
New endpoint for Account Trade:
POST /api/v3/order/cancelReplaceto cancel an existing order and place a new order on the same symbol.
Changed (2)
Update endpoint for Fiat:
GET /sapi/v1/fiat/orders: Weight changes from IP(1) to UID(90000)
Update endpoint for Pay:
GET /sapi/v1/pay/transactions: Param names changed: startTimestamp -> startTime; endTimestamp -> endTime.
Fixed (2)
Included
Examples/CSharpandExamples/FSharpbuild process in CI pipeline.Explicitly set optional parameters in examples.
1.5.0 - 2022-05-27
Added (6)
New endpoint for Binance Code:
GET /sapi/v1/giftcard/cryptography/rsa-public-keyto fetch RSA public key.
New endpoints for Staking:
GET /sapi/v1/staking/productListto get Staking product listPOST /sapi/v1/staking/purchaseto stake product-
POST /sapi/v1/staking/redeemto redeem product
GET /sapi/v1/staking/positionto get Staking product holding positionGET /sapi/v1/staking/stakingRecordto inquiry Staking history recordsPOST /sapi/v1/staking/setAutoStakingto set Auto Staking functionGET /sapi/v1/staking/personalLeftQuotato inquiry Staking left quota
New endpoint for Portfolio Margin:
GET /sapi/v1/portfolio/accountto support query portfolio margin account info
New endpoint for BSwap:
GET /sapi/v1/bswap/removeLiquidityPreviewto get remove liquidity preview
Changed (2)
Update endpoint for Binance Code:
POST /sapi/v1/giftcard/redeemCode: new optional parameter externalUid. Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users.
Update endpoints for Market:
GET /api/v3/ticker/24hr,GET /api/v3/ticker/priceandGET /api/v3/ticker/bookTickernew optional parameter symbols.
Fixed (3)
- Added missing
Marketexamples. - Updated endpoint documentation and examples to latest version.
- Added missing
Miningendpoint parameters.
1.4.0 - 2022-04-20
Added (2)
- New endpoint for Sub-Account
GET /sapi/v1/managed-subaccount/accountSnapshotto support investor master account query asset snapshot of managed sub-account.
- New transfer types
MARGIN,ISOLATED_MARGINand parametersymbolforPOST /sapi/v1/sub-account/universalTransferto support transfer to sub-account cross margin account and isolated margin account.
Changed (4)
- Changed endpoints for Spot Trading
POST /api/v3/order- New optional field trailingDelta.POST /api/v3/order/test- New optional field trailingDelta.POST /api/v3/order/oco- New optional field trailingDelta.
- Changed endpoints for Sub-Account
GET /sapi/v1/sub-account/universalTransfer- The query time period must be less then 30 days; If startTime and endTime not sent, return records of the last 30 days by default.
GET api/v3/depth- The limit value can be outside of the previous values (i.e. 5, 10, 20, 50, 100, 500, 1000,5000) and will return the correct limit. (i.e. if limit=3 then the response will be the top 3 bids and asks)
- The limit still cannot exceed 5000. If the limit provided is greater than 5000, then the response will be truncated to 5000.
Fixed (1)
- Fixed query parameters for
POST /api/v3/order/test.
1.3.1 - 2022-03-08
Fixed (2)
- Query parameter is no longer subject to culture.
- Trade examples have more appropriate arguments
1.3.0 - 2022-03-02
Added (1)
- New endpoints for Wallet
POST /sapi/v1/asset/dust-btcto get assets that can be converted into BNB.
1.2.0 - 2022-02-16
Added (1)
- New endpoints for Binance Code, named as Gift Card to avoid technical confusion.
POST /sapi/v1/giftcard/createCodeto create a Binance Code.POST /sapi/v1/giftcard/redeemCodeto redeem a Binance Code.GET /sapi/v1/giftcard/verifyto verify a Binance Code.
1.1.0 - 2022-01-19
Added (12)
New endpoints for BSwap
- GET /sapi/v1/bswap/poolConfigure to get pool configure
- GET /sapi/v1/bswap/addLiquidityPreview to get add liquidity preview
- GET /sapi/v1/margin/isolated/accountLimit to get remove liquidity preview
- GET /sapi/v1/bswap/unclaimedRewards to get unclaimed rewards record.
- POST /sapi/v1/bswap/claimRewards to claim swap rewards or liquidity rewards.
- GET /sapi/v1/bswap/claimedHistory to get history of claimed rewards.
New endpoints for Trade:
- GET api/v3/rateLimit/order added
New endpoint for Crypto Loans
- GET /sapi/v1/loan/income
New endpoint for Pay
- GET /sapi/v1/pay/transactions to support user query Pay trade history
New endpoint for Convert
- GET /sapi/v1/convert/tradeFlow to support user query convert trade history records
New endpoint for Rebate
- GET /sapi/v1/rebate/taxQuery to support user query spot rebate history records
New endpoint for Margin
- GET /sapi/v1/margin/crossMarginData to get cross margin fee data collection
- GET /sapi/v1/margin/isolatedMarginData to get isolated margin fee data collection
- GET /sapi/v1/margin/isolatedMarginTier to get isolated margin tier data collection
New endpoints for NFT
- GET /sapi/v1/nft/history/transactions to get NFT transaction history
- GET /sapi/v1/nft/history/deposit to get NFT deposit history
- GET /sapi/v1/nft/history/withdraw to get NFT withdraw history
- GET /sapi/v1/nft/user/getAsset to get NFT asset
New endpoint for Mining
- GET /sapi/v1/mining/payment/uid to get Mining account earning.
New endpoints for Sub-Account
- POST /sapi/v1/sub-account/subAccountApi/ipRestriction to support master account enable and disable IP restriction for a sub-account API Key
- POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList to support master account add IP list for a sub-account API Key
- GET /sapi/v1/account/apiRestrictions/ipRestriction to support master account query IP restriction for a sub-account API Key
- DELETE /sapi/v1/account/apiRestrictions/ipRestriction/ipList to support master account delete IP list for a sub-account API Key
Issue templates
- Added templates for bug report and documentation changes
Actions
- Added release action
- Added multi-framework distributable build tests
Changed (6)
Updated endpoints for Sub-Account
- New parameter clientTranId added in POST /sapi/v1/sub-account/universalTransfer and GET /sapi/v1/sub-account/universalTransfer to support custom transfer id
Updated endpoint for Wallet and Futures
- GET /sapi/v1/asset/transfer
- GET /sapi/v1/futures/transfer
- GET /sapi/v1/accountSnapshot
- The query time range of both endpoints are shortened to support data query within the last 6 months only, where startTime does not support selecting a timestamp beyond 6 months. If you do not specify startTime and endTime, the data of the last 7 days will be returned by default.
Updated endpoints for Wallet
- New parameter walletType added in POST /sapi/v1/capital/withdraw/apply
Updated endpoints for Margin
- Removed out limit from GET /sapi/v1/margin/interestRateHistory
- As the Mining account is merged into Funding account, transfer types MAIN_MINING, MINING_MAIN, MINING_UMFUTURE, MARGIN_MINING, and MINING_MARGIN will be discontinued in Universal Transfer endpoint POST /sapi/v1/asset/transfer on January 05, 2022 08:00 AM UTC
Resolved lint warnings
Improved Http Exceptions
1.0.1 - 2022-01-10
Added (2)
- Github CI format & unit tests actions
- Unit tests for enum models
Fixed (1)
- Enum query string serialisation