From 084a0554d8adf01f39d6ee2c4c335457afb6eb08 Mon Sep 17 00:00:00 2001 From: JKorf Date: Fri, 25 Aug 2023 19:27:26 +0200 Subject: [PATCH] Docs --- README.md | 2 + .../IBinanceSocketClientCoinFuturesApi.md | 4 +- .../IBinanceRestClientGeneralApi.md | 3 + .../IBinanceRestClientGeneralApiFutures.md | 156 +---- .../IBinanceRestClientGeneralApiLoans.md | 109 ++++ .../IBinanceRestClientGeneralApiMining.md | 29 + .../IBinanceRestClientGeneralApiStaking.md | 542 ++++++++++++++++++ .../IBinanceRestClientGeneralApiSubAccount.md | 61 ++ .../IBinanceRestClientSpotApiAccount.md | 333 +++++++++-- .../IBinanceRestClientSpotApiExchangeData.md | 82 ++- .../IBinanceRestClientSpotApiTrading.md | 267 ++++++--- ...IBinanceSocketClientSpotApiExchangeData.md | 2 +- .../IBinanceRestClientUsdFuturesApiAccount.md | 108 ++++ .../IBinanceRestClientUsdFuturesApiTrading.md | 89 ++- .../IBinanceSocketClientUsdFuturesApi.md | 54 +- 15 files changed, 1524 insertions(+), 317 deletions(-) create mode 100644 docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiStaking.md diff --git a/README.md b/README.md index 8da21c713..328ff3efc 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ A Discord server is available [here](https://discord.gg/MSpeEtSY8t). For discuss * Version 9.1.0 - 25 Aug 2023 * Removed deprecated endpoints * Updated models + * Added support for rate limiting on the socket client + * Updated the weights and rate limits for the websocket API * Added restClient.GeneralApi.Futures.GetAdjustCrossCollateralLoanToValueHistoryAsync * Added restClient.GeneralApi.Futures.GetCrossCollateralLiquidationHistoryAsync * Added restClient.GeneralApi.Futures.GetCrossCollateralInterestHistoryAsync diff --git a/docs/ClientInfo/CoinFuturesApi/IBinanceSocketClientCoinFuturesApi.md b/docs/ClientInfo/CoinFuturesApi/IBinanceSocketClientCoinFuturesApi.md index 422efb660..898d08dde 100644 --- a/docs/ClientInfo/CoinFuturesApi/IBinanceSocketClientCoinFuturesApi.md +++ b/docs/ClientInfo/CoinFuturesApi/IBinanceSocketClientCoinFuturesApi.md @@ -973,7 +973,7 @@ var result = await client.CoinFuturesApi.SubscribeToUserDataUpdatesAsync(/* para ``` ```csharp -Task> SubscribeToUserDataUpdatesAsync(string listenKey, Action>? onLeverageUpdate, Action>? onMarginUpdate, Action>? onAccountUpdate, Action>? onOrderUpdate, Action> onListenKeyExpired, CancellationToken ct = default); +Task> SubscribeToUserDataUpdatesAsync(string listenKey, Action>? onLeverageUpdate, Action>? onMarginUpdate, Action>? onAccountUpdate, Action>? onOrderUpdate, Action> onListenKeyExpired, Action>? onStrategyUpdate, Action>? onGridUpdate, CancellationToken ct = default); ``` |Parameter|Description| @@ -984,6 +984,8 @@ Task> SubscribeToUserDataUpdatesAsync(string list |onAccountUpdate|The event handler for whenever an account update is received| |onOrderUpdate|The event handler for whenever an order status update is received| |onListenKeyExpired|Responds when the listen key for the stream has expired. Initiate a new instance of the stream here| +|onStrategyUpdate|The event handler for whenever a strategy update is received| +|onGridUpdate|The event handler for whenever a grid update is received| |_[Optional]_ ct|Cancellation token for closing this subscription|

diff --git a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApi.md b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApi.md index f6488a457..928ad7975 100644 --- a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApi.md +++ b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApi.md @@ -23,5 +23,8 @@ parent: Rest API documentation *Endpoints related to savings* **[IBinanceRestClientGeneralApiSavings](IBinanceRestClientGeneralApiSavings.html) Savings { get; }** *** +*Endpoints related to staking* +**[IBinanceRestClientGeneralApiStaking](IBinanceRestClientGeneralApiStaking.html) Staking { get; }** +*** *Endpoints related to requesting data for and controlling sub accounts* **[IBinanceRestClientGeneralApiSubAccount](IBinanceRestClientGeneralApiSubAccount.html) SubAccount { get; }** diff --git a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiFutures.md b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiFutures.md index 4afd4e240..1100e787b 100644 --- a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiFutures.md +++ b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiFutures.md @@ -9,64 +9,6 @@ grand_parent: Rest API documentation *Binance futures interaction endpoints* -*** - -## AdjustCrossCollateralLoanToValueAsync - -[https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-collateral-ltv-v2-trade](https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-collateral-ltv-v2-trade) -

- -*Adjust cross collateral LTV* - -```csharp -var client = new BinanceRestClient(); -var result = await client.GeneralApi.Futures.AdjustCrossCollateralLoanToValueAsync(/* parameters */); -``` - -```csharp -Task> AdjustCrossCollateralLoanToValueAsync(string collateralAsset, string loanAsset, decimal quantity, AdjustRateDirection direction, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|collateralAsset|The collateral asset| -|loanAsset|The loan asset| -|quantity|The quantity| -|direction|The direction| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - -## BorrowForCrossCollateralAsync - -[https://binance-docs.github.io/apidocs/spot/en/#borrow-for-cross-collateral-trade](https://binance-docs.github.io/apidocs/spot/en/#borrow-for-cross-collateral-trade) -

- -*Borrow for cross-collateral* - -```csharp -var client = new BinanceRestClient(); -var result = await client.GeneralApi.Futures.BorrowForCrossCollateralAsync(/* parameters */); -``` - -```csharp -Task> BorrowForCrossCollateralAsync(string asset, string collateralAsset, decimal? quantity = default, decimal? collateralQuantity = default, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|asset|The asset to borrow| -|collateralAsset|The asset to use as collateral| -|_[Optional]_ quantity|The quantity to borrow| -|_[Optional]_ collateralQuantity|The quantity of collateral asset to use| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- *** ## GetAdjustCrossCollateralLoanToValueHistoryAsync @@ -128,24 +70,28 @@ Task>> Ge *** -## GetCrossCollateralInformationAsync +## GetCrossCollateralInterestHistoryAsync -[https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-information-v2-user_data](https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-information-v2-user_data) +[https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-interest-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-interest-history-user_data)

-*Get cross-collateral info* +*Get cross collateral interest history* ```csharp var client = new BinanceRestClient(); -var result = await client.GeneralApi.Futures.GetCrossCollateralInformationAsync(); +var result = await client.GeneralApi.Futures.GetCrossCollateralInterestHistoryAsync(); ``` ```csharp -Task>> GetCrossCollateralInformationAsync(long? receiveWindow = default, CancellationToken ct = default); +Task>> GetCrossCollateralInterestHistoryAsync(string? collateralAsset = default, DateTime? startTime = default, DateTime? endTime = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| |---|---| +|_[Optional]_ collateralAsset|The collateral asset| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ limit|The page size| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| @@ -267,90 +213,6 @@ Task>> GetFuturesT *** -## GetMaxAmountForAdjustCrossCollateralLoanToValueAsync - -[https://binance-docs.github.io/apidocs/spot/en/#get-max-amount-for-adjust-cross-collateral-ltv-v2-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-max-amount-for-adjust-cross-collateral-ltv-v2-user_data) -

- -*Get max quantity for adjust cross-collateral LTV* - -```csharp -var client = new BinanceRestClient(); -var result = await client.GeneralApi.Futures.GetMaxAmountForAdjustCrossCollateralLoanToValueAsync(/* parameters */); -``` - -```csharp -Task> GetMaxAmountForAdjustCrossCollateralLoanToValueAsync(string collateralAsset, string loanAsset, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|collateralAsset|The collateral asset| -|loanAsset|The loan asset| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - -## GetRateAfterAdjustLoanToValueAsync - -[https://binance-docs.github.io/apidocs/spot/en/#calculate-rate-after-adjust-cross-collateral-ltv-v2-user_data](https://binance-docs.github.io/apidocs/spot/en/#calculate-rate-after-adjust-cross-collateral-ltv-v2-user_data) -

- -*Calculate rate after adjust cross-collateral loan to value* - -```csharp -var client = new BinanceRestClient(); -var result = await client.GeneralApi.Futures.GetRateAfterAdjustLoanToValueAsync(/* parameters */); -``` - -```csharp -Task> GetRateAfterAdjustLoanToValueAsync(string collateralAsset, string loanAsset, decimal quantity, AdjustRateDirection direction, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|collateralAsset|The collateral asset| -|loanAsset|The loan asset| -|quantity|The quantity| -|direction|The direction| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - -## RepayForCrossCollateralAsync - -[https://binance-docs.github.io/apidocs/spot/en/#repay-for-cross-collateral-trade](https://binance-docs.github.io/apidocs/spot/en/#repay-for-cross-collateral-trade) -

- -*Repay for cross-collateral* - -```csharp -var client = new BinanceRestClient(); -var result = await client.GeneralApi.Futures.RepayForCrossCollateralAsync(/* parameters */); -``` - -```csharp -Task> RepayForCrossCollateralAsync(string asset, string collateralAsset, decimal quantity, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|asset|The asset| -|collateralAsset|The collateral asset to repay| -|quantity|The quantity to repay| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - ## TransferFuturesAccountAsync [https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data](https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data) diff --git a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiLoans.md b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiLoans.md index c58bc023c..a15c0b8a8 100644 --- a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiLoans.md +++ b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiLoans.md @@ -69,6 +69,33 @@ Task> BorrowAsync(string loanAsset, strin *** +## CustomizeMarginCallAsync + +

+ +*Customize margin call for ongoing orders only.* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Loans.CustomizeMarginCallAsync(/* parameters */); +``` + +```csharp +Task>> CustomizeMarginCallAsync(decimal marginCall, string? orderId = default, string? collateralAsset = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|marginCall|Margin call value| +|_[Optional]_ orderId|Order id. Required if collateralAsset is not send| +|_[Optional]_ collateralAsset|Collateral asset. Required if order id is not send| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetBorrowHistoryAsync [https://binance-docs.github.io/apidocs/spot/en/#borrow-get-loan-borrow-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#borrow-get-loan-borrow-history-user_data) @@ -101,6 +128,61 @@ Task>> GetBorro *** +## GetCollateralAssetsAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-collateral-assets-data-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-collateral-assets-data-user_data) +

+ +*Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Loans.GetCollateralAssetsAsync(); +``` + +```csharp +Task>> GetCollateralAssetsAsync(string? collateralAsset = default, int? vipLevel = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ collateralAsset|Filter by collateral asset| +|_[Optional]_ vipLevel|Vip level| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetCollateralRepayRateAsync + +[https://binance-docs.github.io/apidocs/spot/en/#check-collateral-repay-rate-user_data](https://binance-docs.github.io/apidocs/spot/en/#check-collateral-repay-rate-user_data) +

+ +*Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Loans.GetCollateralRepayRateAsync(/* parameters */); +``` + +```csharp +Task> GetCollateralRepayRateAsync(string loanAsset, string collateralAsset, decimal quantity, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|loanAsset|Loan asset| +|collateralAsset|Collateral asset| +|quantity|Quantity| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetIncomeHistoryAsync [https://binance-docs.github.io/apidocs/spot/en/#get-crypto-loans-income-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-crypto-loans-income-history-user_data) @@ -131,6 +213,33 @@ Task>> GetIncomeHistoryAsync( *** +## GetLoanableAssetsAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-loanable-assets-data-user_data-2](https://binance-docs.github.io/apidocs/spot/en/#get-loanable-assets-data-user_data-2) +

+ +*Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Loans.GetLoanableAssetsAsync(); +``` + +```csharp +Task>> GetLoanableAssetsAsync(string? loanAsset = default, int? vipLevel = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ loanAsset|Filter by loan asset| +|_[Optional]_ vipLevel|Vip level| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetLtvAdjustHistoryAsync [https://binance-docs.github.io/apidocs/spot/en/#adjust-ltv-get-loan-ltv-adjustment-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#adjust-ltv-get-loan-ltv-adjustment-history-user_data) diff --git a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiMining.md b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiMining.md index ff2d04f4c..32bb2b08a 100644 --- a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiMining.md +++ b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiMining.md @@ -148,6 +148,35 @@ Task> GetMinerListAsync(string algorithm, string *** +## GetMiningAccountEarningsAsync + +[https://binance-docs.github.io/apidocs/spot/en/#mining-account-earning-user_data](https://binance-docs.github.io/apidocs/spot/en/#mining-account-earning-user_data) +

+ +*Get mining account earnings* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Mining.GetMiningAccountEarningsAsync(/* parameters */); +``` + +```csharp +Task> GetMiningAccountEarningsAsync(string algo, DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|algo|Algorithm| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetMiningAccountListAsync [https://binance-docs.github.io/apidocs/spot/en/#account-list-user_data](https://binance-docs.github.io/apidocs/spot/en/#account-list-user_data) diff --git a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiStaking.md b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiStaking.md new file mode 100644 index 000000000..932be2f1e --- /dev/null +++ b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiStaking.md @@ -0,0 +1,542 @@ +--- +title: IBinanceRestClientGeneralApiStaking +has_children: false +parent: IBinanceRestClientGeneralApi +grand_parent: Rest API documentation +--- +*[generated documentation]* +`BinanceRestClient > GeneralApi > Staking` +*Binance Staking endpoints* + + +*** + +## GetBethRateHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-beth-rate-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-beth-rate-history-user_data) +

+ +*Get Beth rate history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetBethRateHistoryAsync(); +``` + +```csharp +Task>> GetBethRateHistoryAsync(DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetBethUnwrapHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-wbeth-unwrap-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-wbeth-unwrap-history-user_data) +

+ +*Get unwrap history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetBethUnwrapHistoryAsync(); +``` + +```csharp +Task>> GetBethUnwrapHistoryAsync(DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetBethWrapHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-wbeth-wrap-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-wbeth-wrap-history-user_data) +

+ +*Get wrap history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetBethWrapHistoryAsync(); +``` + +```csharp +Task>> GetBethWrapHistoryAsync(DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetEthRedemptionHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-eth-redemption-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-eth-redemption-history-user_data) +

+ +*Get ETH redemption history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetEthRedemptionHistoryAsync(); +``` + +```csharp +Task>> GetEthRedemptionHistoryAsync(DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetEthRewardsHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-eth-rewards-distribution-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-eth-rewards-distribution-history-user_data) +

+ +*Get ETH rewards history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetEthRewardsHistoryAsync(); +``` + +```csharp +Task>> GetEthRewardsHistoryAsync(DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetEthStakingAccountAsync + +[https://binance-docs.github.io/apidocs/spot/en/#eth-staking-account-user_data](https://binance-docs.github.io/apidocs/spot/en/#eth-staking-account-user_data) +

+ +*Get eth staking account* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetEthStakingAccountAsync(); +``` + +```csharp +Task> GetEthStakingAccountAsync(long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetEthStakingHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-eth-staking-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-eth-staking-history-user_data) +

+ +*Get ETH staking history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetEthStakingHistoryAsync(); +``` + +```csharp +Task>> GetEthStakingHistoryAsync(DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetEthStakingQuotaAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-current-eth-staking-quota-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-current-eth-staking-quota-user_data) +

+ +*Get ETH staking quotas* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetEthStakingQuotaAsync(); +``` + +```csharp +Task> GetEthStakingQuotaAsync(long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetStakingHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-staking-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-staking-history-user_data) +

+ +*Get staking history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetStakingHistoryAsync(/* parameters */); +``` + +```csharp +Task>> GetStakingHistoryAsync(StakingProductType product, StakingTransactionType transactionType, string? asset = default, DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|product|Product type| +|transactionType|Transaction type| +|_[Optional]_ asset|Filter by asset| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ limit|Max results| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetStakingPersonalQuotaAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-personal-left-quota-of-staking-product-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-personal-left-quota-of-staking-product-user_data) +

+ +*Get personal staking quota* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetStakingPersonalQuotaAsync(/* parameters */); +``` + +```csharp +Task> GetStakingPersonalQuotaAsync(StakingProductType product, string productId, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|product|The staking product| +|productId|Product id| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetStakingPositionsAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-position-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-position-user_data) +

+ +*Get staking positions* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetStakingPositionsAsync(/* parameters */); +``` + +```csharp +Task>> GetStakingPositionsAsync(StakingProductType product, string? productId = default, int? page = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|product|Product type| +|_[Optional]_ productId|Product id| +|_[Optional]_ page|Page| +|_[Optional]_ limit|Max results| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetStakingProductsAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-list-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-list-user_data) +

+ +*Get avaialble staking products list* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.GetStakingProductsAsync(/* parameters */); +``` + +```csharp +Task>> GetStakingProductsAsync(StakingProductType product, string? asset = default, int? page = default, int? limit = default, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|product|Product type| +|_[Optional]_ asset|Filter for asset| +|_[Optional]_ page|Page| +|_[Optional]_ limit|Max items per page| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## PurchaseStakingProductAsync + +[https://binance-docs.github.io/apidocs/spot/en/#purchase-staking-product-user_data](https://binance-docs.github.io/apidocs/spot/en/#purchase-staking-product-user_data) +

+ +*Purchase a staking product* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.PurchaseStakingProductAsync(/* parameters */); +``` + +```csharp +Task> PurchaseStakingProductAsync(StakingProductType product, string productId, decimal quantity, bool? renewable = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|product|Product type| +|productId|Product id| +|quantity|Quantity to purchase| +|_[Optional]_ renewable|Renewable| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## RedeemEthStakingAsync + +[https://binance-docs.github.io/apidocs/spot/en/#redeem-eth-trade](https://binance-docs.github.io/apidocs/spot/en/#redeem-eth-trade) +

+ +*Redeem from ETH staking* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.RedeemEthStakingAsync(/* parameters */); +``` + +```csharp +Task> RedeemEthStakingAsync(decimal quantity, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|quantity|Amount| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## RedeemStakingProductAsync + +[https://binance-docs.github.io/apidocs/spot/en/#redeem-staking-product-user_data](https://binance-docs.github.io/apidocs/spot/en/#redeem-staking-product-user_data) +

+ +*Redeem a staking product* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.RedeemStakingProductAsync(/* parameters */); +``` + +```csharp +Task> RedeemStakingProductAsync(StakingProductType product, string productId, string? positionId = default, decimal? quantity = default, bool? renewable = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|product|Product type| +|productId|Product id| +|_[Optional]_ positionId|Position id, required for Staking or LockedDefi types| +|_[Optional]_ quantity|Quantity to purchase| +|_[Optional]_ renewable|Renewable| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## SetAutoStakingAsync + +[https://binance-docs.github.io/apidocs/spot/en/#set-auto-staking-user_data](https://binance-docs.github.io/apidocs/spot/en/#set-auto-staking-user_data) +

+ +*Set auto staking for a product* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.SetAutoStakingAsync(/* parameters */); +``` + +```csharp +Task> SetAutoStakingAsync(StakingProductType product, string positionId, bool renewable, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|product|The staking product| +|positionId|The position| +|renewable|Renewable| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## SubscribeEthStakingAsync + +[https://binance-docs.github.io/apidocs/spot/en/#subscribe-eth-staking-trade](https://binance-docs.github.io/apidocs/spot/en/#subscribe-eth-staking-trade) +

+ +*Subscribe to ETH staking* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.SubscribeEthStakingAsync(/* parameters */); +``` + +```csharp +Task> SubscribeEthStakingAsync(decimal quantity, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|quantity|Amount| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## UnwrapBethAsync + +[https://binance-docs.github.io/apidocs/spot/en/#unwrap-wbeth-trade](https://binance-docs.github.io/apidocs/spot/en/#unwrap-wbeth-trade) +

+ +*Unwarp Beth* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.UnwrapBethAsync(/* parameters */); +``` + +```csharp +Task> UnwrapBethAsync(decimal quantity, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|quantity|Quantity to unwrap| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## WrapBethAsync + +[https://binance-docs.github.io/apidocs/spot/en/#wrap-beth-trade](https://binance-docs.github.io/apidocs/spot/en/#wrap-beth-trade) +

+ +*Wrap Beth* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.Staking.WrapBethAsync(/* parameters */); +``` + +```csharp +Task> WrapBethAsync(decimal quantity, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|quantity|Quantity to wrap| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

diff --git a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiSubAccount.md b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiSubAccount.md index fd4e064ad..234a7d422 100644 --- a/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiSubAccount.md +++ b/docs/ClientInfo/GeneralApi/IBinanceRestClientGeneralApiSubAccount.md @@ -116,6 +116,67 @@ Task> EnableMarginForSubAccountAsy *** +## FuturesAssetTransferAsync + +[https://binance-docs.github.io/apidocs/spot/en/#sub-account-futures-asset-transfer-for-master-account](https://binance-docs.github.io/apidocs/spot/en/#sub-account-futures-asset-transfer-for-master-account) +

+ +*Transfer futures asset (for master account)* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.SubAccount.FuturesAssetTransferAsync(/* parameters */); +``` + +```csharp +Task> FuturesAssetTransferAsync(string fromEmail, string toEmail, FuturesAccountType accountType, string asset, decimal quantity, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|fromEmail|From email| +|toEmail|To email| +|accountType|Futures account| +|asset|Asset| +|quantity|Quantity| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetFuturesAssetTransferHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-futures-asset-transfer-history-for-master-account](https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-futures-asset-transfer-history-for-master-account) +

+ +*Get internal asset transfers for a sub account (for master account)* + +```csharp +var client = new BinanceRestClient(); +var result = await client.GeneralApi.SubAccount.GetFuturesAssetTransferHistoryAsync(/* parameters */); +``` + +```csharp +Task>> GetFuturesAssetTransferHistoryAsync(string email, FuturesAccountType accountType, DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? limit = default, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|email|Email of the sub account| +|accountType|Futures account type| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|The page of the results| +|_[Optional]_ limit|The max amount of results to return (Default 50, max 500)| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetIpRestrictionForSubAccountApiKeyAsync [https://binance-docs.github.io/apidocs/spot/en/#get-ip-restriction-for-a-sub-account-api-key-for-master-account](https://binance-docs.github.io/apidocs/spot/en/#get-ip-restriction-for-a-sub-account-api-key-for-master-account) diff --git a/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiAccount.md b/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiAccount.md index bfd5e7faf..9d4a414a3 100644 --- a/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiAccount.md +++ b/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiAccount.md @@ -37,6 +37,87 @@ Task> CloseIsolatedMarginUserStreamAsync(string symbol, st *** +## ConvertBusdAsync + +[https://binance-docs.github.io/apidocs/spot/en/#busd-convert-trade](https://binance-docs.github.io/apidocs/spot/en/#busd-convert-trade) +

+ +*Convert transfer, convert between BUSD and stablecoins.* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.ConvertBusdAsync(/* parameters */); +``` + +```csharp +Task> ConvertBusdAsync(string clientTransferId, string asset, decimal quantity, string targetAsset, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|clientTransferId|The unique user-defined transaction id, min length 20| +|asset|The current asset| +|quantity|Quantity| +|targetAsset| Target asset you want to convert| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## CrossMarginAdjustMaxLeverageAsync + +[https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-margin-max-leverage-user_data](https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-margin-max-leverage-user_data) +

+ +*Adjust cross margin max leverage* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.CrossMarginAdjustMaxLeverageAsync(/* parameters */); +``` + +```csharp +Task> CrossMarginAdjustMaxLeverageAsync(int maxLeverage, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|maxLeverage|Max leverage, can only adjust 3 or 5| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## CrossMarginSmallLiabilityExchangeAsync + +[https://binance-docs.github.io/apidocs/spot/en/#small-liability-exchange-margin](https://binance-docs.github.io/apidocs/spot/en/#small-liability-exchange-margin) +

+ +*Cross Margin Small Liability Exchange* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.CrossMarginSmallLiabilityExchangeAsync(/* parameters */); +``` + +```csharp +Task CrossMarginSmallLiabilityExchangeAsync(IEnumerable assets, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|assets|Assets| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## CrossMarginTransferAsync [https://binance-docs.github.io/apidocs/spot/en/#margin-account-trade](https://binance-docs.github.io/apidocs/spot/en/#margin-account-trade) @@ -403,6 +484,124 @@ Task> GetBnbBurnStatusAsync(int? receiveWind *** +## GetBusdConvertHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#busd-convert-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#busd-convert-history-user_data) +

+ +*Get Busd convert history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.GetBusdConvertHistoryAsync(); +``` + +```csharp +Task>> GetBusdConvertHistoryAsync(long? transferId = default, string? clientTransferId = default, string? asset = default, DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ transferId|Filter by transferId| +|_[Optional]_ clientTransferId|Filter by clientTransferId| +|_[Optional]_ asset|Filter by asset| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetCloudMiningHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-cloud-mining-payment-and-refund-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-cloud-mining-payment-and-refund-history-user_data) +

+ +*Get the query of Cloud-Mining payment and refund history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.GetCloudMiningHistoryAsync(); +``` + +```csharp +Task>> GetCloudMiningHistoryAsync(long? transferId = default, string? clientTransferId = default, string? asset = default, DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? pageSize = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ transferId|Filter by transferId| +|_[Optional]_ clientTransferId|Filter by clientTransferId| +|_[Optional]_ asset|Filter by asset| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ pageSize|Page size| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetCrossMarginSmallLiabilityExchangeAssetsAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-small-liability-exchange-coin-list-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-small-liability-exchange-coin-list-user_data) +

+ +*Query the coins which can be small liability exchange* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.GetCrossMarginSmallLiabilityExchangeAssetsAsync(); +``` + +```csharp +Task>> GetCrossMarginSmallLiabilityExchangeAssetsAsync(int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetCrossMarginSmallLiabilityExchangeHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-small-liability-exchange-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-small-liability-exchange-history-user_data) +

+ +*Get Small liability Exchange History* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.GetCrossMarginSmallLiabilityExchangeHistoryAsync(); +``` + +```csharp +Task>> GetCrossMarginSmallLiabilityExchangeHistoryAsync(DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? limit = default, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ startTime|Filter by startTime| +|_[Optional]_ endTime|Filter by endTime| +|_[Optional]_ page|The page| +|_[Optional]_ limit|Results per page| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetCrossMarginTransferHistoryAsync [https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-all-open-orders-on-a-symbol-trade](https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-all-open-orders-on-a-symbol-trade) @@ -799,6 +998,33 @@ Task>> GetIsola *** +## GetIsolatedMarginFeeDataAsync + +[https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-fee-data-user_data](https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-fee-data-user_data) +

+ +*Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.GetIsolatedMarginFeeDataAsync(); +``` + +```csharp +Task>> GetIsolatedMarginFeeDataAsync(string? symbol = default, int? vipLevel = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ symbol|Filter by symbol| +|_[Optional]_ vipLevel|User's current specific margin data will be returned if vipLevel is omitted| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetIsolatedMarginTierDataAsync [https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-tier-data-user_data](https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-tier-data-user_data) @@ -877,6 +1103,31 @@ Task> GetMarginAccountInfoAsync(long? receiv *** +## GetMarginAssetsBnbConvertableAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-assets-that-can-be-converted-into-bnb-user_data-2](https://binance-docs.github.io/apidocs/spot/en/#get-assets-that-can-be-converted-into-bnb-user_data-2) +

+ +*Get assets that can be converted into BNB.* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Account.GetMarginAssetsBnbConvertableAsync(); +``` + +```csharp +Task> GetMarginAssetsBnbConvertableAsync(long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetMarginDustLogAsync [https://binance-docs.github.io/apidocs/spot/en/#margin-dustlog-user_data](https://binance-docs.github.io/apidocs/spot/en/#margin-dustlog-user_data) @@ -1294,33 +1545,6 @@ Task> GetRebateHistoryAsync(DateTime? startT *** -## GetStakingPersonalQuotaAsync - -[https://binance-docs.github.io/apidocs/spot/en/#get-personal-left-quota-of-staking-product-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-personal-left-quota-of-staking-product-user_data) -

- -*Get personal staking quota* - -```csharp -var client = new BinanceRestClient(); -var result = await client.SpotApi.Account.GetStakingPersonalQuotaAsync(/* parameters */); -``` - -```csharp -Task> GetStakingPersonalQuotaAsync(StakingProductType product, string productId, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|product|The staking product| -|productId|Product id| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - ## GetTradingStatusAsync [https://binance-docs.github.io/apidocs/spot/en/#account-api-trading-status-user_data](https://binance-docs.github.io/apidocs/spot/en/#account-api-trading-status-user_data) @@ -1569,28 +1793,25 @@ Task> MarginBorrowAsync(string asset, decimal *** -## MarginRepayAsync +## MarginDustTransferAsync -[https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin](https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin) +[https://binance-docs.github.io/apidocs/spot/en/#dust-transfer-trade](https://binance-docs.github.io/apidocs/spot/en/#dust-transfer-trade)

-*Repay loan for margin account.* +*Convert dust assets to BNB.* ```csharp var client = new BinanceRestClient(); -var result = await client.SpotApi.Account.MarginRepayAsync(/* parameters */); +var result = await client.SpotApi.Account.MarginDustTransferAsync(/* parameters */); ``` ```csharp -Task> MarginRepayAsync(string asset, decimal quantity, bool? isIsolated = default, string? symbol = default, int? receiveWindow = default, CancellationToken ct = default); +Task> MarginDustTransferAsync(IEnumerable assets, long? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| |---|---| -|asset|The asset being repay, e.g., BTC| -|quantity|The quantity to be borrow| -|_[Optional]_ isIsolated|For isolated margin or not| -|_[Optional]_ symbol|The isolated symbol| +|assets|The assets being converted| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| @@ -1598,24 +1819,28 @@ Task> MarginRepayAsync(string asset, decimal q *** -## PortfolioMarginBankruptcyLoanRepayAsync +## MarginRepayAsync -[https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-bankruptcy-loan-repay](https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-bankruptcy-loan-repay) +[https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin](https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin)

-*Repay portfolio margin bankruptcy loan* +*Repay loan for margin account.* ```csharp var client = new BinanceRestClient(); -var result = await client.SpotApi.Account.PortfolioMarginBankruptcyLoanRepayAsync(); +var result = await client.SpotApi.Account.MarginRepayAsync(/* parameters */); ``` ```csharp -Task> PortfolioMarginBankruptcyLoanRepayAsync(long? receiveWindow = default, CancellationToken ct = default); +Task> MarginRepayAsync(string asset, decimal quantity, bool? isIsolated = default, string? symbol = default, int? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| |---|---| +|asset|The asset being repay, e.g., BTC| +|quantity|The quantity to be borrow| +|_[Optional]_ isIsolated|For isolated margin or not| +|_[Optional]_ symbol|The isolated symbol| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| @@ -1623,25 +1848,24 @@ Task> PortfolioMarginBankruptcyLoanRepayAsync( *** -## SetAutoConvertStableCoinConfigAsync +## PortfolioMarginBankruptcyLoanRepayAsync +[https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-bankruptcy-loan-repay](https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-bankruptcy-loan-repay)

-*Set auto conversion configuration* +*Repay portfolio margin bankruptcy loan* ```csharp var client = new BinanceRestClient(); -var result = await client.SpotApi.Account.SetAutoConvertStableCoinConfigAsync(/* parameters */); +var result = await client.SpotApi.Account.PortfolioMarginBankruptcyLoanRepayAsync(); ``` ```csharp -Task SetAutoConvertStableCoinConfigAsync(string asset, bool enable, long? receiveWindow = default, CancellationToken ct = default); +Task> PortfolioMarginBankruptcyLoanRepayAsync(long? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| |---|---| -|asset|Asset to configure (USDC, USDP or TUSD)| -|enable|Enable or not| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| @@ -1649,27 +1873,26 @@ Task SetAutoConvertStableCoinConfigAsync(string asset, bool enabl *** -## SetAutoStakingAsync +## SetAutoConvertStableCoinConfigAsync -[https://binance-docs.github.io/apidocs/spot/en/#set-auto-staking-user_data](https://binance-docs.github.io/apidocs/spot/en/#set-auto-staking-user_data) +[https://binance-docs.github.io/apidocs/spot/en/#query-auto-converting-stable-coins-user_data](https://binance-docs.github.io/apidocs/spot/en/#query-auto-converting-stable-coins-user_data)

-*Set auto staking for a product* +*Set auto conversion configuration* ```csharp var client = new BinanceRestClient(); -var result = await client.SpotApi.Account.SetAutoStakingAsync(/* parameters */); +var result = await client.SpotApi.Account.SetAutoConvertStableCoinConfigAsync(/* parameters */); ``` ```csharp -Task> SetAutoStakingAsync(StakingProductType product, string positionId, bool renewable, long? receiveWindow = default, CancellationToken ct = default); +Task SetAutoConvertStableCoinConfigAsync(string asset, bool enable, long? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| |---|---| -|product|The staking product| -|positionId|The position| -|renewable|Renewable| +|asset|Asset to configure (USDC, USDP or TUSD)| +|enable|Enable or not| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| diff --git a/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiExchangeData.md b/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiExchangeData.md index 2907019f7..45fc5e33d 100644 --- a/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiExchangeData.md +++ b/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiExchangeData.md @@ -141,6 +141,7 @@ Task>> GetBookPricesAsync(Cancellati ## GetCrossMarginCollateralRatioAsync +[https://binance-docs.github.io/apidocs/spot/en/#cross-margin-collateral-ratio-market_data](https://binance-docs.github.io/apidocs/spot/en/#cross-margin-collateral-ratio-market_data)

*Get cross margin collateral ratio* @@ -312,6 +313,33 @@ Task> GetExchangeInfoAsync(AccountType[] perm *** +## GetFutureHourlyInterestRateAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-a-future-hourly-interest-rate-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-a-future-hourly-interest-rate-user_data) +

+ +*Get futures hourly interest rate* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.ExchangeData.GetFutureHourlyInterestRateAsync(/* parameters */); +``` + +```csharp +Task>> GetFutureHourlyInterestRateAsync(IEnumerable assets, bool isolated, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|assets|Assets| +|isolated|Isolated or cross| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetIsolatedMarginSymbolAsync [https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-symbol-user_data](https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-symbol-user_data) @@ -547,6 +575,31 @@ Task>> GetMarginAssetsAsync(Cancel *** +## GetMarginDelistScheduleAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-tokens-or-symbols-delist-schedule-for-cross-margin-and-isolated-margin-market_data](https://binance-docs.github.io/apidocs/spot/en/#get-tokens-or-symbols-delist-schedule-for-cross-margin-and-isolated-margin-market_data) +

+ +*Get cross and isolated delist schedule* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.ExchangeData.GetMarginDelistScheduleAsync(); +``` + +```csharp +Task>> GetMarginDelistScheduleAsync(int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetMarginPriceIndexAsync [https://binance-docs.github.io/apidocs/spot/en/#query-margin-priceindex-market_data](https://binance-docs.github.io/apidocs/spot/en/#query-margin-priceindex-market_data) @@ -847,35 +900,6 @@ Task> GetServerTimeAsync(CancellationToken ct = default) *** -## GetStakingProductsAsync - -[https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-list-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-list-user_data) -

- -*Get avaialble staking products list* - -```csharp -var client = new BinanceRestClient(); -var result = await client.SpotApi.ExchangeData.GetStakingProductsAsync(/* parameters */); -``` - -```csharp -Task>> GetStakingProductsAsync(StakingProductType product, string? asset = default, int? page = default, int? limit = default, int? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|product|Product type| -|_[Optional]_ asset|Filter for asset| -|_[Optional]_ page|Page| -|_[Optional]_ limit|Max items per page| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - ## GetSystemStatusAsync [https://binance-docs.github.io/apidocs/spot/en/#system-status-system](https://binance-docs.github.io/apidocs/spot/en/#system-status-system) diff --git a/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiTrading.md b/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiTrading.md index 699f4b1ab..d5da65c86 100644 --- a/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiTrading.md +++ b/docs/ClientInfo/SpotApi/IBinanceRestClientSpotApiTrading.md @@ -69,6 +69,32 @@ Task> AddToLiquidityPoolPreviewAsync(in *** +## CancelAlgoOrderAsync + +[https://binance-docs.github.io/apidocs/spot/en/#cancel-algo-order-trade-2](https://binance-docs.github.io/apidocs/spot/en/#cancel-algo-order-trade-2) +

+ +*Cancel a spot algo order* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Trading.CancelAlgoOrderAsync(/* parameters */); +``` + +```csharp +Task> CancelAlgoOrderAsync(long algoOrderId, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|algoOrderId|Algo order id to cancel| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## CancelAllMarginOrdersAsync [https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-all-open-orders-on-a-symbol-trade](https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-all-open-orders-on-a-symbol-trade) @@ -224,7 +250,7 @@ var result = await client.SpotApi.Trading.CancelOrderAsync(/* parameters */); ``` ```csharp -Task> CancelOrderAsync(string symbol, long? orderId = default, string? origClientOrderId = default, string? newClientOrderId = default, long? receiveWindow = default, CancellationToken ct = default); +Task> CancelOrderAsync(string symbol, long? orderId = default, string? origClientOrderId = default, string? newClientOrderId = default, CancelRestriction? cancelRestriction = default, long? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| @@ -233,6 +259,32 @@ Task> CancelOrderAsync(string symbol, long? orde |_[Optional]_ orderId|The order id of the order| |_[Optional]_ origClientOrderId|The client order id of the order| |_[Optional]_ newClientOrderId|Unique identifier for this cancel| +|_[Optional]_ cancelRestriction|Restrict cancellation based on order state| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## ClaimLiquidityPoolsRewardsAsync + +[https://binance-docs.github.io/apidocs/spot/en/#claim-rewards-trade](https://binance-docs.github.io/apidocs/spot/en/#claim-rewards-trade) +

+ +*Claim liquidity pool rewards* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Trading.ClaimLiquidityPoolsRewardsAsync(); +``` + +```csharp +Task> ClaimLiquidityPoolsRewardsAsync(int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| @@ -268,6 +320,34 @@ Task> ConvertTransferAsync(string cl *** +## GetAlgoSubOrdersAsync + +[https://binance-docs.github.io/apidocs/spot/en/#query-historical-algo-orders-user_data-2](https://binance-docs.github.io/apidocs/spot/en/#query-historical-algo-orders-user_data-2) +

+ +*Get algo sub orders overview* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Trading.GetAlgoSubOrdersAsync(/* parameters */); +``` + +```csharp +Task> GetAlgoSubOrdersAsync(long algoId, int? page = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|algoId|Algo id| +|_[Optional]_ page|Page| +|_[Optional]_ limit|Max results| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetC2CTradeHistoryAsync [https://binance-docs.github.io/apidocs/spot/en/#get-c2c-trade-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-c2c-trade-history-user_data) @@ -298,6 +378,37 @@ Task>> GetC2CTradeHistoryAsync(Or *** +## GetClosedAlgoOrdersAsync + +[https://binance-docs.github.io/apidocs/spot/en/#query-historical-algo-orders-user_data-2](https://binance-docs.github.io/apidocs/spot/en/#query-historical-algo-orders-user_data-2) +

+ +*Get list of closed algo orders* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Trading.GetClosedAlgoOrdersAsync(); +``` + +```csharp +Task> GetClosedAlgoOrdersAsync(string? symbol = default, OrderSide? side = default, DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ symbol|Filter by symbol| +|_[Optional]_ side|Filter by side| +|_[Optional]_ startTime|Fitler by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ page|Page| +|_[Optional]_ limit|Max results| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetConvertTradeHistoryAsync [https://binance-docs.github.io/apidocs/spot/en/#get-convert-trade-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-convert-trade-history-user_data) @@ -473,6 +584,36 @@ Task>> GetLiquidityPoolOperatio *** +## GetLiquidityPoolsClaimHistoryAsync + +[https://binance-docs.github.io/apidocs/spot/en/#get-claimed-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-claimed-history-user_data) +

+ +*Get claimed rewards history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Trading.GetLiquidityPoolsClaimHistoryAsync(); +``` + +```csharp +Task>> GetLiquidityPoolsClaimHistoryAsync(long? poolId = default, string? asset = default, DateTime? startTime = default, DateTime? endTime = default, int? limit = default, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ poolId|Filter by pool id| +|_[Optional]_ asset|Filter by asset| +|_[Optional]_ startTime|Filter by start time| +|_[Optional]_ endTime|Filter by end time| +|_[Optional]_ limit|Max number of results| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetLiquidityPoolSwapHistoryAsync [https://binance-docs.github.io/apidocs/spot/en/#get-swap-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-swap-history-user_data) @@ -768,6 +909,31 @@ Task>> GetOcoOrdersAsync(long? fr *** +## GetOpenAlgoOrdersAsync + +[https://binance-docs.github.io/apidocs/spot/en/#query-current-algo-open-orders-user_data-2](https://binance-docs.github.io/apidocs/spot/en/#query-current-algo-open-orders-user_data-2) +

+ +*Get all open spot algo orders* + +```csharp +var client = new BinanceRestClient(); +var result = await client.SpotApi.Trading.GetOpenAlgoOrdersAsync(); +``` + +```csharp +Task> GetOpenAlgoOrdersAsync(long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetOpenMarginOrdersAsync [https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data](https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data) @@ -962,60 +1128,24 @@ Task>> GetPreventedTradesAsync( *** -## GetStakingHistoryAsync - -[https://binance-docs.github.io/apidocs/spot/en/#get-staking-history-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-staking-history-user_data) -

- -*Get staking history* - -```csharp -var client = new BinanceRestClient(); -var result = await client.SpotApi.Trading.GetStakingHistoryAsync(/* parameters */); -``` - -```csharp -Task>> GetStakingHistoryAsync(StakingProductType product, StakingTransactionType transactionType, string? asset = default, DateTime? startTime = default, DateTime? endTime = default, int? page = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|product|Product type| -|transactionType|Transaction type| -|_[Optional]_ asset|Filter by asset| -|_[Optional]_ startTime|Filter by start time| -|_[Optional]_ endTime|Filter by end time| -|_[Optional]_ page|Page| -|_[Optional]_ limit|Max results| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - -## GetStakingPositionsAsync +## GetUnclaimedLiquidityPoolsRewardsAsync -[https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-position-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-position-user_data) +[https://binance-docs.github.io/apidocs/spot/en/#get-unclaimed-rewards-record-user_data](https://binance-docs.github.io/apidocs/spot/en/#get-unclaimed-rewards-record-user_data)

-*Get staking positions* +*Get unclaimed rewards* ```csharp var client = new BinanceRestClient(); -var result = await client.SpotApi.Trading.GetStakingPositionsAsync(/* parameters */); +var result = await client.SpotApi.Trading.GetUnclaimedLiquidityPoolsRewardsAsync(); ``` ```csharp -Task>> GetStakingPositionsAsync(StakingProductType product, string? productId = default, int? page = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); +Task> GetUnclaimedLiquidityPoolsRewardsAsync(int? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| |---|---| -|product|Product type| -|_[Optional]_ productId|Product id| -|_[Optional]_ page|Page| -|_[Optional]_ limit|Max results| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| @@ -1283,28 +1413,30 @@ Task> PlaceTestOrderAsync(string symbol, Order *** -## PurchaseStakingProductAsync +## PlaceTimeWeightedAveragePriceOrderAsync -[https://binance-docs.github.io/apidocs/spot/en/#purchase-staking-product-user_data](https://binance-docs.github.io/apidocs/spot/en/#purchase-staking-product-user_data) +[https://binance-docs.github.io/apidocs/spot/en/#time-weighted-average-price-twap-new-order-trade-2](https://binance-docs.github.io/apidocs/spot/en/#time-weighted-average-price-twap-new-order-trade-2)

-*Purchase a staking product* +*Place a new spot time weighted average price order* ```csharp var client = new BinanceRestClient(); -var result = await client.SpotApi.Trading.PurchaseStakingProductAsync(/* parameters */); +var result = await client.SpotApi.Trading.PlaceTimeWeightedAveragePriceOrderAsync(/* parameters */); ``` ```csharp -Task> PurchaseStakingProductAsync(StakingProductType product, string productId, decimal quantity, bool? renewable = default, long? receiveWindow = default, CancellationToken ct = default); +Task> PlaceTimeWeightedAveragePriceOrderAsync(string symbol, OrderSide side, decimal quantity, int duration, string? clientOrderId = default, decimal? limitPrice = default, long? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| |---|---| -|product|Product type| -|productId|Product id| -|quantity|Quantity to purchase| -|_[Optional]_ renewable|Renewable| +|symbol|The symbol| +|side|Order side| +|quantity|Order quantity| +|duration|Duration in seconds. 300 - 86400| +|_[Optional]_ clientOrderId|Client order id| +|_[Optional]_ limitPrice|Limit price of the order. If null will use market price| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| @@ -1339,36 +1471,6 @@ Task> RedeemLeveragedTokenAsync(string to *** -## RedeemStakingProductAsync - -[https://binance-docs.github.io/apidocs/spot/en/#redeem-staking-product-user_data](https://binance-docs.github.io/apidocs/spot/en/#redeem-staking-product-user_data) -

- -*Redeem a staking product* - -```csharp -var client = new BinanceRestClient(); -var result = await client.SpotApi.Trading.RedeemStakingProductAsync(/* parameters */); -``` - -```csharp -Task> RedeemStakingProductAsync(StakingProductType product, string productId, string? positionId = default, decimal? quantity = default, bool? renewable = default, long? receiveWindow = default, CancellationToken ct = default); -``` - -|Parameter|Description| -|---|---| -|product|Product type| -|productId|Product id| -|_[Optional]_ positionId|Position id, required for Staking or LockedDefi types| -|_[Optional]_ quantity|Quantity to purchase| -|_[Optional]_ renewable|Renewable| -|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| -|_[Optional]_ ct|Cancellation token| - -

- -*** - ## RemoveFromLiquidityPoolAsync [https://binance-docs.github.io/apidocs/spot/en/#remove-liquidity-trade](https://binance-docs.github.io/apidocs/spot/en/#remove-liquidity-trade) @@ -1439,7 +1541,7 @@ var result = await client.SpotApi.Trading.ReplaceOrderAsync(/* parameters */); ``` ```csharp -Task> ReplaceOrderAsync(string symbol, OrderSide side, SpotOrderType type, CancelReplaceMode cancelReplaceMode, long? cancelOrderId = default, string? cancelClientOrderId = default, string? newCancelClientOrderId = default, string? newClientOrderId = default, decimal? quantity = default, decimal? quoteQuantity = default, decimal? price = default, TimeInForce? timeInForce = default, decimal? stopPrice = default, decimal? icebergQty = default, OrderResponseType? orderResponseType = default, int? trailingDelta = default, int? strategyId = default, int? strategyType = default, int? receiveWindow = default, CancellationToken ct = default); +Task> ReplaceOrderAsync(string symbol, OrderSide side, SpotOrderType type, CancelReplaceMode cancelReplaceMode, long? cancelOrderId = default, string? cancelClientOrderId = default, string? newCancelClientOrderId = default, string? newClientOrderId = default, decimal? quantity = default, decimal? quoteQuantity = default, decimal? price = default, TimeInForce? timeInForce = default, decimal? stopPrice = default, decimal? icebergQty = default, OrderResponseType? orderResponseType = default, int? trailingDelta = default, int? strategyId = default, int? strategyType = default, CancelRestriction? cancelRestriction = default, int? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| @@ -1462,6 +1564,7 @@ Task> ReplaceOrderAsync(string symbol, |_[Optional]_ trailingDelta|Trailing delta value for order in BIPS. A value of 1 means 0.01% trailing delta.| |_[Optional]_ strategyId|Strategy id| |_[Optional]_ strategyType|Strategy type| +|_[Optional]_ cancelRestriction|Restrict cancellation based on order state| |_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| |_[Optional]_ ct|Cancellation token| diff --git a/docs/ClientInfo/SpotApi/IBinanceSocketClientSpotApiExchangeData.md b/docs/ClientInfo/SpotApi/IBinanceSocketClientSpotApiExchangeData.md index cd5f2d6b9..4420e0d74 100644 --- a/docs/ClientInfo/SpotApi/IBinanceSocketClientSpotApiExchangeData.md +++ b/docs/ClientInfo/SpotApi/IBinanceSocketClientSpotApiExchangeData.md @@ -262,7 +262,7 @@ Task>>> GetTickersAsync( ## GetTradeHistoryAsync -[https://binance-docs.github.io/apidocs/websocket_api/en/#historical-trades-market_data](https://binance-docs.github.io/apidocs/websocket_api/en/#historical-trades-market_data) +[https://binance-docs.github.io/apidocs/websocket_api/en/#historical-trades](https://binance-docs.github.io/apidocs/websocket_api/en/#historical-trades)

*Gets the historical trades for a symbol* diff --git a/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.md b/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.md index d2de8979f..d9ae0ddc8 100644 --- a/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.md +++ b/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.md @@ -141,8 +141,63 @@ Task>> GetBracketsAsync(s *** +## GetDownloadIdForOrderHistoryAsync + +[https://binance-docs.github.io/apidocs/futures/en/#get-download-id-for-futures-order-history-user_data](https://binance-docs.github.io/apidocs/futures/en/#get-download-id-for-futures-order-history-user_data) +

+ +*Get download id for downloading order history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.UsdFuturesApi.Account.GetDownloadIdForOrderHistoryAsync(/* parameters */); +``` + +```csharp +Task> GetDownloadIdForOrderHistoryAsync(DateTime startTime, DateTime endTime, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|startTime|Start time of the data to download| +|endTime|End time of the data to download| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetDownloadIdForTradeHistoryAsync + +[https://binance-docs.github.io/apidocs/futures/en/#get-download-id-for-futures-trade-history-user_data](https://binance-docs.github.io/apidocs/futures/en/#get-download-id-for-futures-trade-history-user_data) +

+ +*Get download id for downloading trade history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.UsdFuturesApi.Account.GetDownloadIdForTradeHistoryAsync(/* parameters */); +``` + +```csharp +Task> GetDownloadIdForTradeHistoryAsync(DateTime startTime, DateTime endTime, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|startTime|Start time of the data to download| +|endTime|End time of the data to download| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetDownloadIdForTransactionHistoryAsync +[https://binance-docs.github.io/apidocs/futures/en/#get-download-id-for-futures-transaction-history-user_data](https://binance-docs.github.io/apidocs/futures/en/#get-download-id-for-futures-transaction-history-user_data)

*Get download id for downloading transaction history* @@ -167,8 +222,61 @@ Task> GetDownloadIdForTransactionHis *** +## GetDownloadLinkForOrderHistoryAsync + +[https://binance-docs.github.io/apidocs/futures/en/#get-futures-order-history-download-link-by-id-user_data](https://binance-docs.github.io/apidocs/futures/en/#get-futures-order-history-download-link-by-id-user_data) +

+ +*Get the download link for order history by download id* + +```csharp +var client = new BinanceRestClient(); +var result = await client.UsdFuturesApi.Account.GetDownloadLinkForOrderHistoryAsync(/* parameters */); +``` + +```csharp +Task> GetDownloadLinkForOrderHistoryAsync(string downloadId, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|downloadId|The download id as requested by | +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## GetDownloadLinkForTradeHistoryAsync + +[https://binance-docs.github.io/apidocs/futures/en/#get-futures-trade-download-link-by-id-user_data](https://binance-docs.github.io/apidocs/futures/en/#get-futures-trade-download-link-by-id-user_data) +

+ +*Get the download link for order history by download id* + +```csharp +var client = new BinanceRestClient(); +var result = await client.UsdFuturesApi.Account.GetDownloadLinkForTradeHistoryAsync(/* parameters */); +``` + +```csharp +Task> GetDownloadLinkForTradeHistoryAsync(string downloadId, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|downloadId|The download id as requested by | +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetDownloadLinkForTransactionHistoryAsync +[https://binance-docs.github.io/apidocs/futures/en/#get-futures-transaction-history-download-link-by-id-user_data](https://binance-docs.github.io/apidocs/futures/en/#get-futures-transaction-history-download-link-by-id-user_data)

*Get the download link for transaction history by download id* diff --git a/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.md b/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.md index 3ff57bbae..670226782 100644 --- a/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.md +++ b/docs/ClientInfo/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.md @@ -147,6 +147,63 @@ Task> CancelOrderAsync(string symbol, l *** +## EditMultipleOrdersAsync + +[https://binance-docs.github.io/apidocs/futures/en/#modify-multiple-orders-trade](https://binance-docs.github.io/apidocs/futures/en/#modify-multiple-orders-trade) +

+ +*Edit multiple existing orders* + +```csharp +var client = new BinanceRestClient(); +var result = await client.UsdFuturesApi.Trading.EditMultipleOrdersAsync(/* parameters */); +``` + +```csharp +Task>>> EditMultipleOrdersAsync(IEnumerable orders, int? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|orders|The order info| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + +## EditOrderAsync + +[https://binance-docs.github.io/apidocs/futures/en/#modify-order-trade](https://binance-docs.github.io/apidocs/futures/en/#modify-order-trade) +

+ +*Edit an existing order* + +```csharp +var client = new BinanceRestClient(); +var result = await client.UsdFuturesApi.Trading.EditOrderAsync(/* parameters */); +``` + +```csharp +Task> EditOrderAsync(string symbol, OrderSide side, decimal quantity, decimal price, long? orderId = default, string? origClientOrderId = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|symbol|The symbol| +|side|Order side| +|quantity|New quantity| +|price|New price| +|_[Optional]_ orderId|Order id of the order to edit| +|_[Optional]_ origClientOrderId|Client order id of the order to edit| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetAlgoSubOrdersAsync [https://binance-docs.github.io/apidocs/spot/en/#query-sub-orders-user_data](https://binance-docs.github.io/apidocs/spot/en/#query-sub-orders-user_data) @@ -342,6 +399,36 @@ Task> GetOrderAsync(string symbol, long? orde *** +## GetOrderEditHistoryAsync + +

+ +*Get order edit history* + +```csharp +var client = new BinanceRestClient(); +var result = await client.UsdFuturesApi.Trading.GetOrderEditHistoryAsync(/* parameters */); +``` + +```csharp +Task>> GetOrderEditHistoryAsync(string symbol, long? orderId = default, string? clientOrderId = default, DateTime? startTime = default, DateTime? endTime = default, int? limit = default, long? receiveWindow = default, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|symbol|The symbol to get orders for| +|_[Optional]_ orderId|Filter by order id| +|_[Optional]_ clientOrderId|Filter by client order id| +|_[Optional]_ startTime|If set, only orders edited after this time will be returned| +|_[Optional]_ endTime|If set, only orders edited before this time will be returned| +|_[Optional]_ limit|Max number of results| +|_[Optional]_ receiveWindow|The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request| +|_[Optional]_ ct|Cancellation token| + +

+ +*** + ## GetOrdersAsync [https://binance-docs.github.io/apidocs/futures/en/#all-orders-user_data](https://binance-docs.github.io/apidocs/futures/en/#all-orders-user_data) @@ -416,7 +503,7 @@ var result = await client.UsdFuturesApi.Trading.PlaceMultipleOrdersAsync(/* para ``` ```csharp -Task>>> PlaceMultipleOrdersAsync(BinanceFuturesBatchOrder[] orders, int? receiveWindow = default, CancellationToken ct = default); +Task>>> PlaceMultipleOrdersAsync(IEnumerable orders, int? receiveWindow = default, CancellationToken ct = default); ``` |Parameter|Description| diff --git a/docs/ClientInfo/UsdFuturesApi/IBinanceSocketClientUsdFuturesApi.md b/docs/ClientInfo/UsdFuturesApi/IBinanceSocketClientUsdFuturesApi.md index 22bff8af0..2c621a9d3 100644 --- a/docs/ClientInfo/UsdFuturesApi/IBinanceSocketClientUsdFuturesApi.md +++ b/docs/ClientInfo/UsdFuturesApi/IBinanceSocketClientUsdFuturesApi.md @@ -188,6 +188,57 @@ Task> SubscribeToAllTickerUpdatesAsync(Action + +*Subscribe to asset index updates stream* + +```csharp +var client = new BinanceSocketClient(); +var result = await client.UsdFuturesApi.SubscribeToAssetIndexUpdatesAsync(/* parameters */); +``` + +```csharp +Task> SubscribeToAssetIndexUpdatesAsync(Action>> onMessage, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|onMessage|The event handler for the received data| +|_[Optional]_ ct|Cancellation token for closing this subscription| + +

+ +*** + +## SubscribeToAssetIndexUpdatesAsync + +[https://binance-docs.github.io/apidocs/futures/en/#multi-assets-mode-asset-index-2](https://binance-docs.github.io/apidocs/futures/en/#multi-assets-mode-asset-index-2) +

+ +*Subscribe to asset index updates for a single* + +```csharp +var client = new BinanceSocketClient(); +var result = await client.UsdFuturesApi.SubscribeToAssetIndexUpdatesAsync(/* parameters */); +``` + +```csharp +Task> SubscribeToAssetIndexUpdatesAsync(string symbol, Action> onMessage, CancellationToken ct = default); +``` + +|Parameter|Description| +|---|---| +|symbol|The symbol| +|onMessage|The event handler for the received data| +|_[Optional]_ ct|Cancellation token for closing this subscription| + +

+ +*** + ## SubscribeToBookTickerUpdatesAsync [https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-book-ticker-streams](https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-book-ticker-streams) @@ -837,7 +888,7 @@ var result = await client.UsdFuturesApi.SubscribeToUserDataUpdatesAsync(/* param ``` ```csharp -Task> SubscribeToUserDataUpdatesAsync(string listenKey, Action>? onLeverageUpdate, Action>? onMarginUpdate, Action>? onAccountUpdate, Action>? onOrderUpdate, Action> onListenKeyExpired, Action>? onStrategyUpdate, Action>? onGridUpdate, CancellationToken ct = default); +Task> SubscribeToUserDataUpdatesAsync(string listenKey, Action>? onLeverageUpdate, Action>? onMarginUpdate, Action>? onAccountUpdate, Action>? onOrderUpdate, Action> onListenKeyExpired, Action>? onStrategyUpdate, Action>? onGridUpdate, Action>? onConditionalOrderTriggerRejectUpdate, CancellationToken ct = default); ``` |Parameter|Description| @@ -850,6 +901,7 @@ Task> SubscribeToUserDataUpdatesAsync(string list |onListenKeyExpired|Responds when the listen key for the stream has expired. Initiate a new instance of the stream here| |onStrategyUpdate|The event handler for whenever a strategy update is received| |onGridUpdate|The event handler for whenever a grid update is received| +|onConditionalOrderTriggerRejectUpdate|The event handler for whenever a trigger order failed to place an order| |_[Optional]_ ct|Cancellation token for closing this subscription|