@@ -25,6 +25,7 @@ Always create the client via `BinanceRestClient`. For trading, configure credent
2525
2626``` csharp
2727using Binance .Net .Clients ;
28+ using Binance .Net ;
2829using Binance .Net .Objects ;
2930
3031var restClient = new BinanceRestClient (options =>
@@ -102,8 +103,9 @@ var order = await restClient.UsdFuturesApi.Trading.PlaceOrderAsync(
102103 symbol : " ETHUSDT" ,
103104 side : OrderSide .Buy ,
104105 type : FuturesOrderType .Market ,
105- quantity : 0 . 1 m ,
106- positionSide : PositionSide .Long );
106+ quantity : 0 . 1 m );
107+
108+ // In Hedge mode add positionSide: PositionSide.Long / PositionSide.Short.
107109```
108110
109111## Core Pattern: WebSocket Subscriptions
@@ -148,6 +150,7 @@ For exchange-agnostic code, use the unified shared interfaces. Same code works a
148150
149151``` csharp
150152using Binance .Net .Clients ;
153+ using Binance .Net ;
151154using CryptoExchange .Net .SharedApis ;
152155
153156var binanceShared = new BinanceRestClient ().SpotApi .SharedClient ;
@@ -166,13 +169,10 @@ Available shared client interfaces include: `ISpotTickerRestClient`, `ISpotOrder
166169``` csharp
167170using Binance .Net ;
168171
169- services .AddBinance (restOptions =>
172+ services .AddBinance (options =>
170173{
171- restOptions .ApiCredentials = new BinanceCredentials (" API_KEY" , " API_SECRET" );
172- },
173- socketOptions =>
174- {
175- socketOptions .ApiCredentials = new BinanceCredentials (" API_KEY" , " API_SECRET" );
174+ options .Rest .ApiCredentials = new BinanceCredentials (" API_KEY" , " API_SECRET" );
175+ options .Socket .ApiCredentials = new BinanceCredentials (" API_KEY" , " API_SECRET" );
176176});
177177
178178// Inject IBinanceRestClient and IBinanceSocketClient into your services.
@@ -192,7 +192,7 @@ socketOptions =>
192192## Environments
193193
194194``` csharp
195- using Binance .Net . Objects ;
195+ using Binance .Net ;
196196
197197// Live (default)
198198var live = new BinanceRestClient (o => o .Environment = BinanceEnvironment .Live );
@@ -206,11 +206,11 @@ var us = new BinanceRestClient(o => o.Environment = BinanceEnvironment.Us);
206206
207207## When the user wants other Binance features
208208
209- - ** Sub-accounts / Brokerage** : ` restClient.SpotApi .SubAccount ` and ` Brokerage ` namespaces
210- - ** Margin** : ` restClient.SpotApi.Margin `
209+ - ** Sub-accounts / Brokerage** : ` restClient.GeneralApi .SubAccount ` and ` restClient.GeneralApi. Brokerage`
210+ - ** Margin** : margin endpoints are under ` restClient.SpotApi.Account ` and ` restClient.SpotApi.Trading `
211211- ** Wallet** : ` restClient.SpotApi.Account ` (deposit, withdrawal, asset details)
212- - ** Convert** : ` restClient.SpotApi.Trading.ConvertAsync* `
213- - ** Portfolio Margin** : ` restClient.SpotApi.PortfolioMargin `
212+ - ** Convert** : ` restClient.SpotApi.Trading.ConvertQuoteRequestAsync ` , ` ConvertAcceptQuoteAsync ` , ` GetConvertOrderStatusAsync ` , etc.
213+ - ** Portfolio Margin** : ` restClient.SpotApi.Account.GetPortfolioMargin* ` / ` PortfolioMarginBankruptcyLoanRepayAsync `
214214- ** Options** : separate Options API (less commonly used)
215215
216216## Reference
0 commit comments