From ad49a8136ee65fe681b2222871e4a86236e6c7fc Mon Sep 17 00:00:00 2001 From: Jan Korf Date: Sat, 27 Jul 2024 13:13:23 +0200 Subject: [PATCH] Update to System.Text.Json (#1398) * Switch from Newtonsoft.Json implementation to System.Text.Json for (de)serialization * Refactored from old per type enum converter to EnumConverter usage * Updated CryptoExchange.Net to 7.10.0 * Added SpotApi.Account.GetCommissionRatesAsync endpoint * Added UsdFuturesApi.Account.GetSymbolConfigurationAsync endpoint * Added UsdFuturesApi.Account.GetAccountConfigurationAsync endpoint * Added UsdFuturesApi.Trading.GetPositionsAsync endpoint * Added PermissionSets property to SpotApi.ExchangeData.GetExchangeInfoAsync symbol response * Updated UsdFuturesApi.Account.GetBalancesAsync to V3 * Updated UsdFuturesApi.Account.GetAccountInfoAsync to V3 --- Binance.Net.UnitTests/BinanceClientTests.cs | 13 +- .../BinanceRestIntegrationTests.cs | 33 +- .../Account/ChangeInitialLeverage.txt | 2 +- .../CoinFutures/Account/GetAccountInfo.txt | 42 +- .../CoinFutures/Account/GetBalances.txt | 2 +- .../CoinFutures/Account/GetBrackets.txt | 16 +- .../GetDownloadIdForTransactionHistory.txt | 4 +- .../GetDownloadLinkForTransactionHistory.txt | 12 +- .../CoinFutures/Account/GetIncomeHistory.txt | 14 +- .../GetPositionAdlQuantileEstimation.txt | 11 +- .../Account/GetPositionInformation.txt | 8 +- .../Account/GetUserCommissionRate.txt | 4 +- .../GetAggregatedTradeHistory.txt | 14 +- .../GetContinuousContractKlines.txt | 24 +- .../ExchangeData/GetExchangeInfo.txt | 24 +- .../ExchangeData/GetFundingInfo.txt | 2 +- .../ExchangeData/GetFundingRates.txt | 2 +- .../GetGlobalLongShortAccountRatio.txt | 4 +- .../ExchangeData/GetIndexPriceKlines.txt | 24 +- .../CoinFutures/ExchangeData/GetKlines.txt | 24 +- .../ExchangeData/GetMarkPriceKlines.txt | 24 +- .../ExchangeData/GetMarkPrices.txt | 12 +- .../ExchangeData/GetOpenInterestHistory.txt | 4 +- .../CoinFutures/ExchangeData/GetOrderBook.txt | 12 +- .../CoinFutures/ExchangeData/GetPrices.txt | 2 +- .../ExchangeData/GetRecentTrades.txt | 2 +- .../GetTakerBuySellVolumeRatio.txt | 16 +- .../CoinFutures/ExchangeData/GetTickers.txt | 6 +- .../GetTopLongShortAccountRatio.txt | 4 +- .../GetTopLongShortPositionRatio.txt | 4 +- .../ExchangeData/GetTradeHistory.txt | 2 +- .../Trading/CancelMultipleOrders.txt | 10 +- .../CoinFutures/Trading/CancelOrder.txt | 10 +- .../CoinFutures/Trading/GetOpenOrder.txt | 12 +- .../CoinFutures/Trading/GetOpenOrders.txt | 14 +- .../CoinFutures/Trading/GetOrder.txt | 14 +- .../CoinFutures/Trading/GetOrders.txt | 14 +- .../CoinFutures/Trading/GetUserTrades.txt | 32 +- .../Trading/PlaceMultipleOrders.txt | 8 +- .../CoinFutures/Trading/PlaceOrder.txt | 10 +- .../AddIpRestrictionForSubAccountApiKey.txt | 2 +- .../General/Brokerage/GetSubAccounts.txt | 4 +- .../General/CryptoLoans/GetBorrowHistory.txt | 2 +- .../CryptoLoans/GetCollateralRepayRate.txt | 2 +- .../General/CryptoLoans/GetRepayHistory.txt | 4 +- .../Endpoints/General/CryptoLoans/Repay.txt | 2 +- .../Spot/Account/GetAPIKeyPermissions.txt | 16 +- .../Account/GetAccountVipLevelAndStatus.txt | 8 + .../Spot/Account/GetAssetsForDustTransfer.txt | 12 +- .../Spot/Account/GetCommissionRates.txt | 24 + .../Account/GetDailyFutureAccountSnapshot.txt | 8 +- .../Account/GetDailyMarginAccountSnapshot.txt | 4 +- .../Account/GetDailySpotAccountSnapshot.txt | 4 +- .../Account/GetFiatDepositWithdrawHistory.txt | 6 +- .../Spot/Account/GetFiatPaymentHistory.txt | 12 +- .../Spot/Account/GetFundingWallet.txt | 6 +- .../Spot/Account/GetIsolatedMarginAccount.txt | 4 +- .../Account/GetLeveragedTokensUserLimit.txt | 8 +- .../Spot/Account/GetMarginAccountInfo.txt | 6 +- .../Spot/Account/GetMarginInterestHistory.txt | 4 +- .../Endpoints/Spot/Account/GetMarginLoans.txt | 10 +- .../Spot/Account/GetMarginMaxBorrowAmount.txt | 4 +- .../Spot/Account/GetMarginRepays.txt | 10 +- .../Spot/Account/GetMarginTransferHistory.txt | 8 +- .../Account/GetPortfolioMarginAccountInfo.txt | 6 +- .../GetPortfolioMarginBankruptcyLoan.txt | 2 +- .../GetPortfolioMarginCollateralRate.txt | 2 +- .../Spot/Account/GetRebateHistory.txt | 8 +- .../Spot/Account/GetTradingStatus.txt | 12 +- .../Endpoints/Spot/Account/GetTransfers.txt | 2 +- .../Endpoints/Spot/Account/GetUserAssets.txt | 10 +- .../Spot/Account/GetWithdrawalAddresses.txt | 8 +- .../Spot/Account/GetWithdrawalHistory.txt | 22 +- .../Endpoints/Spot/Account/MarginBorrow.txt | 1 - .../Endpoints/Spot/Account/MarginRepay.txt | 1 - .../GetAggregatedTradeHistory.txt | 16 +- .../Spot/ExchangeData/GetAssetDetails.txt | 10 +- .../Spot/ExchangeData/GetAvgPrice.txt | 6 +- .../Spot/ExchangeData/GetExchangeInfo.txt | 6 - .../Endpoints/Spot/ExchangeData/GetKlines.txt | 24 +- .../ExchangeData/GetRollingWindowTicker.txt | 16 +- .../Endpoints/Spot/ExchangeData/GetTicker.txt | 6 +- .../Spot/ExchangeData/GetTradeHistory.txt | 2 +- .../Spot/ExchangeData/GetTradingDayTicker.txt | 16 +- .../Spot/ExchangeData/GetUiKlines.txt | 24 +- .../Spot/Trading/CancelAllMarginOrders.txt | 4 +- .../Spot/Trading/CancelMarginOcoOrder.txt | 2 +- .../Spot/Trading/CancelMarginOrder.txt | 2 +- .../Endpoints/Spot/Trading/CancelOrder.txt | 2 +- .../Spot/Trading/ConvertAcceptQuote.txt | 2 +- .../Spot/Trading/GetC2CTradeHistory.txt | 8 +- .../Spot/Trading/GetConvertTradeHistory.txt | 14 +- .../GetLeveragedTokensRedemptionRecords.txt | 8 +- .../GetLeveragedTokensSubscriptionRecords.txt | 8 +- .../Spot/Trading/GetMarginOcoOrder.txt | 2 +- .../Spot/Trading/GetMarginOcoOrders.txt | 2 +- .../Spot/Trading/GetMarginOpenOcoOrders.txt | 2 +- .../Endpoints/Spot/Trading/GetOpenOrders.txt | 2 +- .../Endpoints/Spot/Trading/GetOrder.txt | 2 +- .../Endpoints/Spot/Trading/GetOrders.txt | 2 +- .../Endpoints/Spot/Trading/GetUserTrades.txt | 2 +- .../Spot/Trading/PlaceMarginOCOOrder.txt | 6 +- .../Spot/Trading/PlaceMarginOrder.txt | 6 +- .../Endpoints/Spot/Trading/PlaceOrder.txt | 2 +- .../Endpoints/Spot/Trading/PlaceTestOrder.txt | 12 +- .../Spot/Trading/RedeemLeveragedToken.txt | 6 +- .../Spot/Trading/SubscribeLeveragedToken.txt | 6 +- .../Account/GetAccountConfiguration.txt | 13 + .../UsdFutures/Account/GetAccountInfo.txt | 122 +- .../UsdFutures/Account/GetAccountInfoV3.txt | 62 + .../UsdFutures/Account/GetBalances.txt | 18 +- .../UsdFutures/Account/GetBnbBurnStatus.txt | 2 +- .../UsdFutures/Account/GetBrackets.txt | 16 +- .../Account/GetDownloadIdForOrderHistory.txt | 4 +- .../Account/GetDownloadIdForTradeHistory.txt | 4 +- .../GetDownloadIdForTransactionHistory.txt | 4 +- .../GetDownloadLinkForOrderHistory.txt | 8 +- .../GetDownloadLinkForTradeHistory.txt | 8 +- .../GetDownloadLinkForTransactionHistory.txt | 8 +- .../UsdFutures/Account/GetIncomeHistory.txt | 14 +- .../UsdFutures/Account/GetMultiAssetsMode.txt | 2 +- .../UsdFutures/Account/GetOrderRateLimit.txt | 4 +- .../GetPositionAdlQuantileEstimation.txt | 10 +- .../Account/GetSymbolConfiguration.txt | 12 + .../UsdFutures/Account/GetTradingStatus.txt | 26 +- .../Account/GetUserCommissionRate.txt | 4 +- .../GetAggregatedTradeHistory.txt | 14 +- .../UsdFutures/ExchangeData/GetBookPrice.txt | 2 +- .../ExchangeData/GetCompositeIndexInfo.txt | 4 +- .../GetContinuousContractKlines.txt | 24 +- .../ExchangeData/GetExchangeInfo.txt | 24 +- .../ExchangeData/GetFundingInfo.txt | 2 +- .../ExchangeData/GetFundingRates.txt | 2 +- .../GetGlobalLongShortAccountRatio.txt | 8 +- .../ExchangeData/GetIndexPriceKlines.txt | 24 +- .../UsdFutures/ExchangeData/GetKlines.txt | 24 +- .../UsdFutures/ExchangeData/GetMarkPrice.txt | 8 +- .../ExchangeData/GetMarkPriceKlines.txt | 24 +- .../ExchangeData/GetOpenInterest.txt | 2 +- .../ExchangeData/GetOpenInterestHistory.txt | 6 +- .../UsdFutures/ExchangeData/GetOrderBook.txt | 8 +- .../UsdFutures/ExchangeData/GetPrice.txt | 2 +- .../ExchangeData/GetRecentTrades.txt | 2 +- .../GetTakerBuySellVolumeRatio.txt | 2 +- .../UsdFutures/ExchangeData/GetTicker.txt | 6 +- .../GetTopLongShortAccountRatio.txt | 8 +- .../GetTopLongShortPositionRatio.txt | 8 +- .../ExchangeData/GetTradeHistory.txt | 2 +- .../Trading/CancelMultipleOrders.txt | 16 +- .../UsdFutures/Trading/CancelOrder.txt | 16 +- .../UsdFutures/Trading/EditOrder.txt | 6 +- .../UsdFutures/Trading/GetOpenOrder.txt | 18 +- .../UsdFutures/Trading/GetOpenOrders.txt | 20 +- .../Endpoints/UsdFutures/Trading/GetOrder.txt | 20 +- .../Trading/GetOrderEditHistory.txt | 6 +- .../UsdFutures/Trading/GetOrders.txt | 20 +- .../UsdFutures/Trading/GetPositions.txt | 49 + .../Trading/PlaceMultipleOrders.txt | 14 +- .../UsdFutures/Trading/PlaceOrder.txt | 16 +- .../Account/ChangeInitialLeverageAsync.txt | 5 - .../Account/ChangeMarginTypeAsync.txt | 4 - .../Account/GetAccountInfoAsync.txt | 70 - .../CoinFutures/Account/GetBalancesAsync.txt | 12 - .../CoinFutures/Account/GetBracketsAsync.txt | 14 - .../Account/GetIncomeHistoryAsync.txt | 22 - .../Account/GetMarginChangeHistoryAsync.txt | 18 - .../GetPositionAdlQuantileEstimationAsync.txt | 22 - .../Account/GetPositionInformationAsync.txt | 47 - .../Account/GetPositionModeAsync.txt | 3 - .../Account/ModifyPositionMarginAsync.txt | 6 - .../Account/ModifyPositionModeAsync.txt | 4 - .../GetAggregatedTradeHistoryAsync.txt | 11 - .../ExchangeData/GetBasisAsync.txt | 20 - .../ExchangeData/GetBookPricesAsync.txt | 11 - .../GetContinuousContractKlinesAsync.txt | 16 - .../ExchangeData/GetExchangeInfoAsync.txt | 88 - .../ExchangeData/GetFundingInfoAsync.txt | 8 - .../ExchangeData/GetFundingRatesAsync.txt | 14 - .../GetGlobalLongShortAccountRatioAsync.txt | 16 - .../ExchangeData/GetIndexPriceKlinesAsync.txt | 16 - .../ExchangeData/GetKlinesAsync.txt | 16 - .../ExchangeData/GetMarkPriceKlinesAsync.txt | 16 - .../ExchangeData/GetMarkPricesAsync.txt | 24 - .../ExchangeData/GetOpenInterestAsync.txt | 7 - .../GetOpenInterestHistoryAsync.txt | 16 - .../ExchangeData/GetOrderBookAsync.txt | 19 - .../ExchangeData/GetPricesAsync.txt | 8 - .../ExchangeData/GetRecentTradesAsync.txt | 10 - .../GetTakerBuySellVolumeRatioAsync.txt | 20 - .../ExchangeData/GetTickersAsync.txt | 21 - .../GetTopLongShortAccountRatioAsync.txt | 16 - .../GetTopLongShortPositionRatioAsync.txt | 16 - .../ExchangeData/GetTradeHistoryAsync.txt | 10 - .../CoinFutures/Socket/AggTradeUpdate.txt | 12 - .../CoinFutures/Socket/BookTickerUpdate.txt | 11 - .../CoinFutures/Socket/ContractInfoUpdate.txt | 30 - .../CoinFutures/Socket/IndexPriceUpdate.txt | 6 - .../CoinFutures/Socket/KlineUpdate.txt | 24 - .../Socket/LiquidationOrderUpdate.txt | 21 - .../CoinFutures/Socket/MarkPriceUpdate.txt | 10 - .../CoinFutures/Socket/MiniTickerUpdate.txt | 12 - .../CoinFutures/Socket/OrderBookUpdate.txt | 21 - .../CoinFutures/Socket/PartialBookUpdate.txt | 53 - .../CoinFutures/Socket/TickerUpdate.txt | 20 - .../CancelAllOrdersAfterTimeoutAsync.txt | 4 - .../Trading/CancelAllOrdersAsync.txt | 4 - .../CoinFutures/Trading/CancelOrderAsync.txt | 26 - .../Trading/GetForcedOrdersAsync.txt | 50 - .../CoinFutures/Trading/GetOpenOrderAsync.txt | 26 - .../Trading/GetOpenOrdersAsync.txt | 27 - .../CoinFutures/Trading/GetOrderAsync.txt | 25 - .../CoinFutures/Trading/GetOrdersAsync.txt | 28 - .../Trading/GetUserTradesAsync.txt | 20 - .../CoinFutures/Trading/PlaceOrderAsync.txt | 26 - .../General/CryptoLoans/AdjustLTVAsync.txt | 7 - .../General/CryptoLoans/BorrowAsync.txt | 8 - .../CryptoLoans/CustomizeMarginCallAsync.txt | 12 - .../CryptoLoans/GetBorrowHistoryAsync.txt | 16 - .../CryptoLoans/GetCollateralAssetsAsync.txt | 13 - .../GetCollateralRepayRateAsync.txt | 6 - .../CryptoLoans/GetIncomeHistoryAsync.txt | 16 - .../CryptoLoans/GetLoanableAssetsAsync.txt | 21 - .../CryptoLoans/GetLtvAdjustHistoryAsync.txt | 15 - .../CryptoLoans/GetOpenBorrowOrdersAsync.txt | 15 - .../CryptoLoans/GetRepayHistoryAsync.txt | 16 - .../General/CryptoLoans/RepayAsync.txt | 9 - .../General/SimpleEarn/GetAccountAsync.txt | 8 - .../SimpleEarn/GetCollateralRecordsAsync.txt | 14 - .../GetFlexiblePersonalQuotaLeftAsync.txt | 3 - .../GetFlexibleProductPositionsAsync.txt | 24 - .../SimpleEarn/GetFlexibleProductsAsync.txt | 22 - .../GetFlexibleRedemptionRecordsAsync.txt | 14 - .../GetFlexibleRewardRecordsAsync.txt | 19 - .../GetFlexibleSubscriptionPreviewAsync.txt | 8 - .../GetFlexibleSubscriptionRecordsAsync.txt | 16 - .../GetLockedPersonalQuotaLeftAsync.txt | 3 - .../GetLockedProductPositionsAsync.txt | 19 - .../SimpleEarn/GetLockedProductsAsync.txt | 24 - .../GetLockedRedemptionRecordsAsync.txt | 16 - .../GetLockedRewardRecordsAsync.txt | 12 - .../GetLockedSubscriptionPreviewAsync.txt | 14 - .../GetLockedSubscriptionRecordsAsync.txt | 18 - .../SimpleEarn/GetRateHistoryAsync.txt | 11 - .../SimpleEarn/RedeemFlexibleProductAsync.txt | 4 - .../SimpleEarn/RedeemLockedProductAsync.txt | 4 - .../SetFlexibleAutoSubscribeAsync.txt | 3 - .../SetLockedAutoSubscribeAsync.txt | 3 - .../SubscribeFlexibleProductAsync.txt | 4 - .../SubscribeLockedProductAsync.txt | 5 - .../Staking/GetBethRateHistoryAsync.txt | 10 - .../Staking/GetBethUnwrapHistoryAsync.txt | 14 - .../Staking/GetBethWrapHistoryAsync.txt | 14 - .../Staking/GetEthRedemptionHistoryAsync.txt | 12 - .../Staking/GetEthRewardsHistoryAsync.txt | 13 - .../Staking/GetEthStakingAccountAsync.txt | 4 - .../Staking/GetEthStakingHistoryAsync.txt | 11 - .../Staking/GetEthStakingQuotaAsync.txt | 4 - ...dIpRestrictionForSubAccountApiKeyAsync.txt | 6 - ...nbBurnForSubAccountMarginInterestAsync.txt | 4 - ...BnbBurnForSubAccountSpotAndMarginAsync.txt | 4 - ...eIpRestrictionForSubAccountApiKeyAsync.txt | 10 - .../ChangeSubAccountApiKeyPermissionAsync.txt | 7 - ...ntCoinFuturesCommissionAdjustmentAsync.txt | 8 - .../ChangeSubAccountCommissionAsync.txt | 7 - ...ccountFuturesCommissionAdjustmentAsync.txt | 8 - .../CreateApiKeyForSubAccountAsync.txt | 8 - .../Spot/Brokerage/CreateSubAccountAsync.txt | 5 - ...eIpRestrictionForSubAccountApiKeyAsync.txt | 8 - .../Brokerage/DeleteSubAccountApiKeyAsync.txt | 1 - .../EnableFuturesForSubAccountAsync.txt | 5 - .../EnableLeverageTokenForSubAccountAsync.txt | 4 - .../EnableMarginForSubAccountAsync.txt | 5 - .../GetBnbBurnStatusForSubAccountAsync.txt | 5 - .../Brokerage/GetBrokerAccountInfoAsync.txt | 8 - .../GetBrokerCommissionRebatesRecentAsync.txt | 19 - ...erFuturesCommissionRebatesHistoryAsync.txt | 18 - ...tIpRestrictionForSubAccountApiKeyAsync.txt | 10 - .../Brokerage/GetSubAccountApiKeyAsync.txt | 7 - ...ntCoinFuturesCommissionAdjustmentAsync.txt | 18 - .../GetSubAccountDepositHistoryAsync.txt | 34 - .../GetSubAccountFuturesAssetInfoAsync.txt | 25 - ...ccountFuturesCommissionAdjustmentAsync.txt | 18 - .../GetSubAccountMarginAssetInfoAsync.txt | 21 - .../GetSubAccountSpotAssetInfoAsync.txt | 17 - .../Spot/Brokerage/GetSubAccountsAsync.txt | 22 - .../GetTransferFuturesHistoryAsync.txt | 25 - .../Brokerage/GetTransferHistoryAsync.txt | 22 - .../GetTransferHistoryUniversalAsync.txt | 24 - .../Spot/Brokerage/TransferAsync.txt | 4 - .../Spot/Brokerage/TransferFuturesAsync.txt | 5 - .../Spot/Brokerage/TransferUniversalAsync.txt | 4 - .../AdjustCrossCollateralLoanToValueAsync.txt | 6 - .../Futures/BorrowForCrossCollateralAsync.txt | 8 - ...CrossCollateralLoanToValueHistoryAsync.txt | 15 - .../GetCrossCollateralBorrowHistoryAsync.txt | 17 - .../GetCrossCollateralInformationAsync.txt | 12 - ...CrossCollateralLiquidationHistoryAsync.txt | 14 - .../GetCrossCollateralRepayHistoryAsync.txt | 18 - .../Futures/GetCrossCollateralWalletAsync.txt | 27 - .../GetFuturesTransferHistoryAsync.txt | 13 - ...rAdjustCrossCollateralLoanToValueAsync.txt | 4 - .../GetRateAfterAdjustLoanToValueAsync.txt | 3 - .../Futures/RepayForCrossCollateralAsync.txt | 6 - .../Futures/TransferFuturesAccountAsync.txt | 3 - .../CancelHashrateResaleRequestAsync.txt | 5 - .../Mining/GetHashrateResaleDetailsAsync.txt | 28 - .../Mining/GetHashrateResaleListAsync.txt | 30 - .../Spot/Mining/GetMinerDetailsAsync.txt | 38 - .../Spot/Mining/GetMinerListAsync.txt | 28 - .../Spot/Mining/GetMiningAccountListAsync.txt | 38 - .../Mining/GetMiningAlgorithmListAsync.txt | 12 - .../Spot/Mining/GetMiningCoinListAsync.txt | 13 - .../Mining/GetMiningOtherRevenueListAsync.txt | 17 - .../Spot/Mining/GetMiningRevenueListAsync.txt | 40 - .../Spot/Mining/GetMiningStatisticsAsync.txt | 24 - .../PlaceHashrateResaleRequestAsync.txt | 5 - .../Savings/ChangeToDailyPositionAsync.txt | 5 - .../GetCryptoLoansIncomeHistoryAsync.txt | 16 - ...etCustomizedFixedProjectPositionsAsync.txt | 21 - ...ixedAndCustomizedFixedProjectListAsync.txt | 20 - .../Savings/GetFlexibleProductListAsync.txt | 30 - .../GetFlexibleProductPositionAsync.txt | 18 - ...ilyPurchaseQuotaOfFlexableProductAsync.txt | 4 - ...yRedemptionQuotaOfFlexibleProductAsync.txt | 6 - .../Spot/Savings/GetLendingAccountAsync.txt | 22 - .../GetLendingInterestHistoryAsync.txt | 16 - .../Spot/Savings/GetPurchaseRecordsAsync.txt | 12 - .../Savings/GetRedemptionRecordsAsync.txt | 13 - .../PurchaseCustomizedFixedProjectAsync.txt | 3 - .../Savings/PurchaseFlexibleProductAsync.txt | 3 - .../Savings/RedeemFlexibleProductAsync.txt | 1 - .../CreateVirtualSubAccountAsync.txt | 3 - .../EnableBlvtForSubAccountAsync.txt | 4 - .../EnableFuturesForSubAccountAsync.txt | 6 - .../EnableMarginForSubAccountAsync.txt | 6 - .../GetFuturesAssetTransferHistoryAsync.txt | 22 - .../SubAccount/GetSubAccountAssetsAsync.txt | 29 - .../GetSubAccountBtcValuesAsync.txt | 14 - .../GetSubAccountDepositAddressAsync.txt | 6 - .../GetSubAccountDepositHistoryAsync.txt | 26 - .../GetSubAccountMarginDetailsAsync.txt | 47 - .../SubAccount/GetSubAccountStatusAsync.txt | 11 - ...ubAccountTransferHistoryForMasterAsync.txt | 20 - ...countTransferHistoryForSubAccountAsync.txt | 26 - .../Spot/SubAccount/GetSubAccountsAsync.txt | 14 - .../GetSubAccountsFuturesSummaryAsync.txt | 34 - .../GetSubAccountsMarginSummaryAsync.txt | 19 - .../GetUniversalTransferHistoryAsync.txt | 38 - .../SubAccount/TransferSubAccountAsync.txt | 3 - .../TransferSubAccountFuturesAsync.txt | 3 - .../TransferSubAccountMarginAsync.txt | 3 - .../TransferSubAccountToMasterAsync.txt | 3 - .../TransferSubAccountToSubAccountAsync.txt | 3 - Binance.Net.UnitTests/JsonSocketTests.cs | 127 - Binance.Net.UnitTests/JsonTests.cs | 190 - Binance.Net.UnitTests/RestIntergrationTest.cs | 73 - Binance.Net.UnitTests/RestRequestTests.cs | 40 +- .../SocketSubscriptionTests.cs | 10 +- .../Spot/Account/AccountPosition.txt | 14 +- .../Subscriptions/Spot/Account/Balance.txt | 10 +- .../Subscriptions/Spot/Account/OcoOrder.txt | 28 +- .../Subscriptions/Spot/Account/Order.txt | 68 +- .../Spot/ExchangeData/BookTicker.txt | 12 +- .../Spot/ExchangeData/Klines.txt | 40 +- .../Spot/ExchangeData/MiniTicker.txt | 18 +- .../Spot/ExchangeData/PartialBook.txt | 14 +- .../Spot/ExchangeData/RollingWindowTicker.txt | 34 +- .../Spot/ExchangeData/Ticker.txt | 46 +- .../Spot/ExchangeData/Trades.txt | 22 +- .../Subscriptions/UsdFutures/AggTrades.txt | 20 +- .../Subscriptions/UsdFutures/AssetIndex.txt | 20 +- .../Subscriptions/UsdFutures/Book.txt | 26 +- .../Subscriptions/UsdFutures/BookTicker.txt | 18 +- .../UsdFutures/CompositIndex.txt | 20 +- .../UsdFutures/ConditionalTrigger.txt | 12 +- .../Subscriptions/UsdFutures/ContKlines.txt | 40 +- .../Subscriptions/UsdFutures/GridUpdate.txt | 26 +- .../Subscriptions/UsdFutures/Klines.txt | 40 +- .../Subscriptions/UsdFutures/Leverage.txt | 10 +- .../Subscriptions/UsdFutures/Liquidations.txt | 26 +- .../Subscriptions/UsdFutures/MarginUpdate.txt | 24 +- .../Subscriptions/UsdFutures/MarkPrice.txt | 16 +- .../Subscriptions/UsdFutures/MiniTicker.txt | 18 +- .../UsdFutures/MultiAssetMode.txt | 10 +- .../Subscriptions/UsdFutures/OrderUpdate.txt | 82 +- .../Subscriptions/UsdFutures/PartialBook.txt | 18 +- .../UsdFutures/StrategyUpdate.txt | 18 +- .../UsdFutures/SymbolUpdates.txt | 30 +- .../Subscriptions/UsdFutures/Ticker.txt | 36 +- .../JsonToObjectComparer.cs | 369 -- .../TestImplementations/TestHelpers.cs | 4 +- .../TestImplementations/TestSocket.cs | 4 +- Binance.Net/Binance.Net.csproj | 2 +- Binance.Net/Binance.Net.xml | 4421 +++++++---------- .../BinanceRestClientCoinFuturesApi.cs | 4 + .../BinanceRestClientCoinFuturesApiAccount.cs | 10 +- ...nceRestClientCoinFuturesApiExchangeData.cs | 43 +- .../BinanceRestClientCoinFuturesApiTrading.cs | 29 +- .../BinanceSocketClientCoinFuturesApi.cs | 18 +- .../GeneralApi/BinanceRestClientGeneralApi.cs | 4 + .../BinanceRestClientGeneralApiBrokerage.cs | 48 +- .../BinanceRestClientGeneralApiFutures.cs | 2 +- .../BinanceRestClientGeneralApiLoans.cs | 2 +- .../BinanceRestClientGeneralApiMining.cs | 2 +- .../BinanceRestClientGeneralApiSubAccount.cs | 19 +- .../SpotApi/BinanceRestClientSpotApi.cs | 16 +- .../BinanceRestClientSpotApiAccount.cs | 35 +- .../BinanceRestClientSpotApiExchangeData.cs | 12 +- .../BinanceRestClientSpotApiTrading.cs | 38 +- .../SpotApi/BinanceSocketClientSpotApi.cs | 8 +- .../BinanceSocketClientSpotApiExchangeData.cs | 4 +- .../BinanceSocketClientSpotApiTrading.cs | 18 +- .../BinanceRestClientUsdFuturesApi.cs | 6 +- .../BinanceRestClientUsdFuturesApiAccount.cs | 49 +- ...anceRestClientUsdFuturesApiExchangeData.cs | 20 +- .../BinanceRestClientUsdFuturesApiTrading.cs | 60 +- .../BinanceSocketClientUsdFuturesApi.cs | 14 +- .../Converters/AccountTypeConverter.cs | 152 + .../AccountUpdateReasonConverter.cs | 31 - .../AdjustRateDirectionConverter.cs | 16 - .../Converters/AutoCloseTypeConverter.cs | 16 - .../Converters/BinanceEarningTypeConverter.cs | 26 - Binance.Net/Converters/BlvtStatusConverter.cs | 17 - .../BrokerageAccountTypeConverter.cs | 44 - ...erageTransferTransactionStatusConverter.cs | 19 - .../Converters/ContractTypeConverter.cs | 23 - .../Converters/DepositStatusConverter.cs | 17 - .../Converters/ExecutionTypeConverter.cs | 22 - .../Converters/FiatPaymentStatusConverter.cs | 18 - .../FiatWithdrawDepositStatusConverter.cs | 22 - .../Converters/FuturesAccountTypeConverter.cs | 16 - ...turesMarginChangeDirectionTypeConverter.cs | 16 - .../Converters/FuturesMarginTypeConverter.cs | 17 - .../Converters/FuturesOrderTypeConverter.cs | 49 - .../FuturesTransferStatusConverter.cs | 17 - .../FuturesTransferTypeConverter.cs | 18 - .../HashrateResaleStatusConverter.cs | 17 - Binance.Net/Converters/IncomeTypeConverter.cs | 33 - .../Converters/IndicatorTypeConverter.cs | 17 - Binance.Net/Converters/InterfaceConverter.cs | 19 +- ...solatedMarginTransferDirectionConverter.cs | 16 - .../Converters/KlineIntervalConverter.cs | 30 - .../Converters/LendingTypeConverter.cs | 17 - .../Converters/LiquidityTypeConverter.cs | 16 - .../Converters/ListOrderStatusConverter.cs | 17 - .../Converters/ListStatusTypeConverter.cs | 17 - .../Converters/LoanIncomeTypeConverter.cs | 21 - .../Converters/MarginLevelStatusConverter.cs | 19 - .../Converters/MarginStatusConverter.cs | 18 - .../Converters/MinerStatusConverter.cs | 18 - .../Converters/OrderRejectReasonConverter.cs | 25 - .../Converters/OrderResponseTypeConverter.cs | 17 - Binance.Net/Converters/OrderSideConverter.cs | 16 - .../Converters/OrderStatusConverter.cs | 25 - .../Converters/PeriodIntervalConverter.cs | 23 - .../Converters/PositionModeConverter.cs | 22 - .../Converters/PositionSideConverter.cs | 17 - .../Converters/ProductStatusConverter.cs | 17 - .../Converters/ProjectStatusConverter.cs | 16 - .../Converters/ProjectTypeConverter.cs | 16 - Binance.Net/Converters/RateLimitConverter.cs | 18 - Binance.Net/Converters/RedeemTypeConverter.cs | 16 - .../Converters/SideEffectTypeConverter.cs | 18 - .../Converters/SpotOrderTypeConverter.cs | 48 - .../SubAccountFuturesTransferTypeConverter.cs | 28 - .../SubAccountMarginTransferTypeConverter.cs | 24 - ...bAccountTransferSubAccountTypeConverter.cs | 24 - .../Converters/SymbolFilterConverter.cs | 361 +- .../Converters/SymbolFilterTypeConverter.cs | 27 - .../SymbolFuturesFilterConverter.cs | 431 +- .../Converters/SymbolStatusConverter.cs | 27 - .../Converters/SystemStatusConverter.cs | 21 - .../Converters/TimeInForceConverter.cs | 20 - .../TransferAccountTypeConverter.cs | 19 - .../Converters/TransferDirectionConverter.cs | 16 - .../TransferDirectionTypeConverter.cs | 21 - .../Converters/UnderlyingTypeConverter.cs | 16 - .../UniversalTransferTypeConverter.cs | 58 - Binance.Net/Converters/WalletTypeConverter.cs | 16 - .../WithdrawDepositTransferTypeConverter.cs | 24 - .../Converters/WithdrawalStatusConverter.cs | 26 - .../Converters/WorkingTypeConverter.cs | 16 - Binance.Net/Enums/AccountType.cs | 70 +- Binance.Net/Enums/AccountUpdateReason.cs | 25 +- Binance.Net/Enums/AdjustRateDirection.cs | 6 +- Binance.Net/Enums/AutoCloseType.cs | 6 +- Binance.Net/Enums/BlvtStatus.cs | 7 +- Binance.Net/Enums/BrokerageAccountType.cs | 21 +- .../BrokerageTransferTransactionStatus.cs | 24 +- ...eBusdConvertType.cs => BusdConvertType.cs} | 2 +- Binance.Net/Enums/ContractType.cs | 3 + Binance.Net/Enums/DepositStatus.cs | 7 +- .../{BinanceEarningType.cs => EarningType.cs} | 17 +- Binance.Net/Enums/ExecutionType.cs | 12 +- Binance.Net/Enums/FiatPaymentStatus.cs | 8 +- .../Enums/FiatWithdrawDepositStatus.cs | 12 +- Binance.Net/Enums/FutureTransferType.cs | 8 +- .../Enums/FuturesMarginChangeDirectionType.cs | 6 +- Binance.Net/Enums/FuturesMarginType.cs | 7 +- Binance.Net/Enums/FuturesTransferStatus.cs | 7 +- Binance.Net/Enums/HashrateResaleStatus.cs | 7 +- Binance.Net/Enums/IncomeType.cs | 23 +- Binance.Net/Enums/IndicatorType.cs | 5 +- .../Enums/IsolatedMarginTransferDirection.cs | 7 +- Binance.Net/Enums/LendingType.cs | 7 +- Binance.Net/Enums/LiquidityType.cs | 6 +- Binance.Net/Enums/ListOrderStatus.cs | 7 +- Binance.Net/Enums/ListStatusType.cs | 7 +- Binance.Net/Enums/LoanIncomeType.cs | 11 +- Binance.Net/Enums/MarginLevelStatus.cs | 7 + Binance.Net/Enums/MarginStatus.cs | 8 +- Binance.Net/Enums/MinerStatus.cs | 8 +- Binance.Net/Enums/OrderRejectReason.cs | 15 +- Binance.Net/Enums/OrderResponseType.cs | 7 +- Binance.Net/Enums/OrderStatus.cs | 15 +- Binance.Net/Enums/PositionSide.cs | 7 +- Binance.Net/Enums/ProductStatus.cs | 7 +- Binance.Net/Enums/ProjectStatus.cs | 6 +- Binance.Net/Enums/ProjectType.cs | 6 +- Binance.Net/Enums/RateLimitType.cs | 8 +- Binance.Net/Enums/RedeemType.cs | 6 +- Binance.Net/Enums/SideEffectType.cs | 8 +- Binance.Net/Enums/SpotOrderType.cs | 8 + .../SubAccountDepositStatus.cs} | 19 +- .../Enums/SubAccountMarginTransferType.cs | 6 +- .../Enums/SubAccountTransferSubAccountType.cs | 6 +- Binance.Net/Enums/SubAccountTransferType.cs | 25 - Binance.Net/Enums/SymbolFilterType.cs | 18 +- Binance.Net/Enums/SymbolStatus.cs | 6 + Binance.Net/Enums/SystemStatus.cs | 6 +- Binance.Net/Enums/TransferAccountType.cs | 9 +- Binance.Net/Enums/TransferDirection.cs | 6 +- Binance.Net/Enums/TransferDirectionType.cs | 6 +- Binance.Net/Enums/UnderlyingType.cs | 6 +- Binance.Net/Enums/UniversalTransferType.cs | 40 +- .../Enums/WithdrawDepositTransferType.cs | 6 +- Binance.Net/Enums/WithdrawalStatus.cs | 11 +- Binance.Net/Enums/WorkingType.cs | 6 +- .../IBinanceRestClientGeneralApiBrokerage.cs | 10 +- .../IBinanceRestClientGeneralApiSubAccount.cs | 2 +- .../IBinanceRestClientSpotApiAccount.cs | 10 + .../IBinanceRestClientUsdFuturesApiAccount.cs | 26 +- .../IBinanceRestClientUsdFuturesApiTrading.cs | 8 + Binance.Net/Objects/BinanceApiAddresses.cs | 6 +- Binance.Net/Objects/BinanceResponse.cs | 15 +- .../Internal/BinanceExchangeApiWrapper.cs | 5 + .../Internal/BinanceSnapshotWrapper.cs | 5 +- .../Objects/Internal/BinanceSocketRequest.cs | 10 +- .../Objects/Models/Binance24HPriceBase.cs | 19 +- .../Objects/Models/BinanceCombinedStream.cs | 4 +- .../Objects/Models/BinanceOrderBase.cs | 37 +- .../Objects/Models/BinanceQueryRecords.cs | 2 + .../Objects/Models/BinanceRateLimit.cs | 6 +- Binance.Net/Objects/Models/BinanceResult.cs | 4 +- .../Models/BinanceRollingWindowTick.cs | 17 +- .../Objects/Models/BinanceStreamEvent.cs | 4 +- .../Futures/AlgoOrders/BinanceAlgoOrder.cs | 23 +- .../AlgoOrders/BinanceAlgoOrderResult.cs | 2 + .../Futures/AlgoOrders/BinanceAlgoResult.cs | 2 + .../Futures/AlgoOrders/BinanceAlgoSubOrder.cs | 28 +- .../Models/Futures/BinanceBnbBurnStatus.cs | 2 +- .../Futures/BinanceFuturesAccountAsset.cs | 17 +- .../Futures/BinanceFuturesAccountBalance.cs | 13 +- .../BinanceFuturesAccountConfiguration.cs | 55 + .../Futures/BinanceFuturesAccountInfo.cs | 24 +- .../Futures/BinanceFuturesAccountInfoV3.cs | 210 + ...BinanceFuturesAccountUserCommissionRate.cs | 3 + .../Futures/BinanceFuturesAssetIndex.cs | 16 +- .../Models/Futures/BinanceFuturesBasis.cs | 10 +- .../Models/Futures/BinanceFuturesBookPrice.cs | 1 + .../BinanceFuturesBuySellVolumeRatio.cs | 7 +- .../Futures/BinanceFuturesCancelAllOrders.cs | 4 +- .../Futures/BinanceFuturesChangeMarginType.cs | 3 +- .../Futures/BinanceFuturesCoin24HPrice.cs | 5 +- .../Futures/BinanceFuturesCoinAccountInfo.cs | 8 + .../BinanceFuturesCoinBuySellVolumeRatio.cs | 12 +- .../BinanceFuturesCoinOpenInterestHistory.cs | 7 +- .../BinanceFuturesCompositeIndexInfo.cs | 10 +- .../Futures/BinanceFuturesCountDownResult.cs | 2 + .../Futures/BinanceFuturesDownloadIdInfo.cs | 3 +- .../Futures/BinanceFuturesDownloadLink.cs | 6 +- .../Futures/BinanceFuturesExchangeInfo.cs | 7 + .../Futures/BinanceFuturesFundingInfo.cs | 8 +- .../BinanceFuturesFundingRateHistory.cs | 5 +- .../Futures/BinanceFuturesIncomeHistory.cs | 23 +- ...nanceFuturesInitialLeverageChangeResult.cs | 7 +- .../Futures/BinanceFuturesLongShortRatio.cs | 14 +- ...BinanceFuturesMarginChangeHistoryResult.cs | 12 +- .../Models/Futures/BinanceFuturesMarkPrice.cs | 11 +- .../Futures/BinanceFuturesMultiAssetMode.cs | 2 +- ...BinanceFuturesMultipleOrderCancelResult.cs | 6 +- .../BinanceFuturesMultipleOrderPlaceResult.cs | 6 +- .../Futures/BinanceFuturesOpenInterest.cs | 7 +- .../BinanceFuturesOpenInterestHistory.cs | 5 +- .../Models/Futures/BinanceFuturesOrder.cs | 58 +- .../Models/Futures/BinanceFuturesOrderBook.cs | 6 +- .../Futures/BinanceFuturesOrderEditHistory.cs | 26 +- .../BinanceFuturesPositionMarginResult.cs | 7 +- .../Futures/BinanceFuturesPositionMode.cs | 4 +- .../BinanceFuturesQuantileEstimation.cs | 8 +- .../Models/Futures/BinanceFuturesSymbol.cs | 52 +- .../Futures/BinanceFuturesSymbolBracket.cs | 21 +- .../Futures/BinanceFuturesSymbolFilter.cs | 126 - .../Models/Futures/BinanceFuturesTrade.cs | 25 +- .../Futures/BinanceFuturesTradingStatus.cs | 7 + .../Models/Futures/BinanceFuturesUsdtAsset.cs | 3 + .../Objects/Models/Futures/BinancePosition.cs | 43 +- .../Models/Futures/BinancePositionV3.cs | 114 + .../Futures/BinanceSymbolConfiguration.cs | 41 + ...inanceConditionOrderTriggerRejectUpdate.cs | 10 +- .../Socket/BinanceFuturesStreamAccountInfo.cs | 36 +- .../BinanceFuturesStreamAssetIndexUpdate.cs | 20 +- .../Socket/BinanceFuturesStreamBookPrice.cs | 6 +- .../Socket/BinanceFuturesStreamCoinKline.cs | 38 +- .../BinanceFuturesStreamCompositeIndex.cs | 18 +- .../BinanceFuturesStreamConfigUpdate.cs | 12 +- .../BinanceFuturesStreamContinuousKline.cs | 8 +- .../Socket/BinanceFuturesStreamIndexKline.cs | 39 +- .../Socket/BinanceFuturesStreamIndexPrice.cs | 4 +- .../Socket/BinanceFuturesStreamLiquidation.cs | 24 +- .../BinanceFuturesStreamMarginUpdate.cs | 20 +- .../Socket/BinanceFuturesStreamMarkPrice.cs | 16 +- .../BinanceFuturesStreamOrderBookDepth.cs | 14 +- .../Socket/BinanceFuturesStreamOrderUpdate.cs | 72 +- .../BinanceFuturesStreamSymbolUpdate.cs | 28 +- .../Futures/Socket/BinanceGridUpdate.cs | 24 +- .../Futures/Socket/BinanceStrategyUpdate.cs | 16 +- .../Objects/Models/Spot/Binance24hPrice.cs | 13 +- .../Models/Spot/BinanceAPIKeyPermissions.cs | 13 +- .../Objects/Models/Spot/BinanceAccountInfo.cs | 27 +- .../Models/Spot/BinanceAccountStatus.cs | 2 +- .../Models/Spot/BinanceAggregatedTrade.cs | 16 +- .../Spot/BinanceAutoConversionSettings.cs | 4 +- .../Models/Spot/BinanceAveragePrice.cs | 6 +- .../Models/Spot/BinanceBnbBurnStatus.cs | 2 + .../Objects/Models/Spot/BinanceBookPrice.cs | 13 +- .../Models/Spot/BinanceBusdConvertResult.cs | 4 +- .../Objects/Models/Spot/BinanceBusdHistory.cs | 20 +- .../Models/Spot/BinanceC2CUserTrade.cs | 18 +- .../Objects/Models/Spot/BinanceCheckTime.cs | 2 +- .../Models/Spot/BinanceCloudMiningHistory.cs | 12 +- .../Objects/Models/Spot/BinanceCommissions.cs | 88 + .../Models/Spot/BinanceDelistSchedule.cs | 4 +- .../Models/Spot/BinanceDepositAddress.cs | 5 +- .../Objects/Models/Spot/BinanceDepositList.cs | 24 +- .../Models/Spot/BinanceDividendRecords.cs | 12 +- .../Objects/Models/Spot/BinanceDustLog.cs | 24 +- .../Models/Spot/BinanceDustTransferResult.cs | 16 +- .../Models/Spot/BinanceElligableDust.cs | 16 +- .../Models/Spot/BinanceEventOrderBook.cs | 33 +- .../Models/Spot/BinanceExchangeInfo.cs | 5 + .../Objects/Models/Spot/BinanceFiatPayment.cs | 18 +- .../Models/Spot/BinanceFiatWithdrawDeposit.cs | 14 +- .../Models/Spot/BinanceFundingAsset.cs | 7 +- .../Spot/BinanceFuturesAccountSnapshot.cs | 17 +- .../Models/Spot/BinanceIpRestriction.cs | 5 +- .../Objects/Models/Spot/BinanceListResult.cs | 6 +- .../Objects/Models/Spot/BinanceListenKey.cs | 1 + .../Objects/Models/Spot/BinanceOrderBook.cs | 6 +- .../Models/Spot/BinanceOrderOcoList.cs | 20 +- .../Models/Spot/BinanceOrderRateLimit.cs | 1 + .../Objects/Models/Spot/BinanceOrderTrade.cs | 9 +- .../Objects/Models/Spot/BinancePayTrade.cs | 53 +- .../Objects/Models/Spot/BinancePlacedOrder.cs | 10 +- .../Models/Spot/BinancePreventedTrade.cs | 9 + .../Objects/Models/Spot/BinancePrice.cs | 6 +- .../Objects/Models/Spot/BinanceProduct.cs | 64 +- .../Objects/Models/Spot/BinanceRebate.cs | 10 +- .../Objects/Models/Spot/BinanceRecentTrade.cs | 16 +- .../Models/Spot/BinanceReplaceOrderResult.cs | 13 +- .../Models/Spot/BinanceSpotAccountSnapshot.cs | 7 +- .../Models/Spot/BinanceSpotFuturesTransfer.cs | 12 +- .../Objects/Models/Spot/BinanceSymbol.cs | 45 +- .../Models/Spot/BinanceSymbolFilter.cs | 12 +- .../Models/Spot/BinanceSystemStatus.cs | 4 +- .../Models/Spot/BinanceTestOrderCommission.cs | 18 +- .../Objects/Models/Spot/BinanceTrade.cs | 21 +- .../Objects/Models/Spot/BinanceTradeFee.cs | 5 +- .../Models/Spot/BinanceTradingDayTicker.cs | 19 +- .../Models/Spot/BinanceTradingStatus.cs | 14 +- .../Objects/Models/Spot/BinanceTransfer.cs | 9 +- .../Objects/Models/Spot/BinanceUserAsset.cs | 44 +- .../Objects/Models/Spot/BinanceUserBalance.cs | 4 + .../Models/Spot/BinanceVipLevelAndStatus.cs | 6 +- .../Models/Spot/BinanceWalletBalance.cs | 6 +- .../Objects/Models/Spot/BinanceWithdrawal.cs | 27 +- .../Models/Spot/BinanceWithdrawalAddress.cs | 16 +- .../Models/Spot/BinanceWithdrawalFee.cs | 6 +- .../Models/Spot/BinanceWithdrawalPlaced.cs | 1 + .../Models/Spot/Blvt/BinanceBlvtInfo.cs | 21 +- .../Models/Spot/Blvt/BinanceBlvtInfoUpdate.cs | 18 +- .../Spot/Blvt/BinanceBlvtRedeemResult.cs | 9 +- .../Models/Spot/Blvt/BinanceBlvtRedemption.cs | 8 +- .../Spot/Blvt/BinanceBlvtSubscribeResult.cs | 8 +- .../Spot/Blvt/BinanceBlvtSubscription.cs | 8 +- .../Models/Spot/Blvt/BinanceBlvtUserLimit.cs | 3 + .../BinanceBrokerageAccountInfo.cs | 16 +- .../BinanceBrokerageAddIpRestrictionResult.cs | 5 +- .../BinanceBrokerageApiKeyCreateResult.cs | 14 +- .../BinanceBrokerageBnbBurnStatus.cs | 7 +- ...kerageChangeBnbBurnMarginInterestResult.cs | 5 +- ...okerageChangeBnbBurnSpotAndMarginResult.cs | 5 +- .../BinanceBrokerageEnableFuturesResult.cs | 7 +- ...nanceBrokerageEnableLeverageTokenResult.cs | 5 +- .../BinanceBrokerageEnableMarginResult.cs | 7 +- .../BinanceBrokerageFuturesAssetInfo.cs | 16 +- .../BinanceBrokerageFuturesRebate.cs | 15 +- .../BinanceBrokerageFuturesType.cs | 18 - .../BinanceBrokerageIpRestriction.cs | 6 +- .../BinanceBrokerageMarginAssetInfo.cs | 17 +- .../SubAccountData/BinanceBrokerageRebate.cs | 9 +- .../BinanceBrokerageSpotAssetInfo.cs | 4 + .../BinanceBrokerageSubAccount.cs | 4 +- .../BinanceBrokerageSubAccountApiKey.cs | 12 +- ...rokerageSubAccountCoinFuturesCommission.cs | 16 +- .../BinanceBrokerageSubAccountCommission.cs | 13 +- .../BinanceBrokerageSubAccountCreateResult.cs | 3 + ...ceBrokerageSubAccountDepositTransaction.cs | 31 +- ...nceBrokerageSubAccountFuturesCommission.cs | 15 +- .../BinanceBrokerageTransferFuturesResult.cs | 7 +- ...anceBrokerageTransferFuturesTransaction.cs | 29 +- .../BinanceBrokerageTransferResult.cs | 4 +- .../BinanceBrokerageTransferTransaction.cs | 19 +- ...ceBrokerageTransferTransactionUniversal.cs | 18 +- .../Spot/Convert/BinanceConvertAssetPair.cs | 12 +- .../Spot/Convert/BinanceConvertOrderStatus.cs | 16 +- .../BinanceConvertQuantityPrecisionAsset.cs | 2 + .../Spot/Convert/BinanceConvertQuote.cs | 8 +- .../Spot/Convert/BinanceConvertResult.cs | 4 +- .../Spot/Convert/BinanceConvertTrade.cs | 17 +- .../BinanceConvertTransferRecord.cs | 12 +- .../BinanceConvertTransferResult.cs | 3 +- .../BinanceCrossCollateralAdjustLtvHistory.cs | 52 - .../BinanceCrossCollateralAdjustLtvResult.cs | 38 - .../BinanceCrossCollateralAdjustMaxAmounts.cs | 19 - .../BinanceCrossCollateralAfterAdjust.cs | 13 - .../BinanceCrossCollateralBorrowHistory.cs | 60 - .../BinanceCrossCollateralBorrowResult.cs | 38 - .../BinanceCrossCollateralInformation.cs | 43 - .../BinanceCrossCollateralInterestHistory.cs | 42 - ...inanceCrossCollateralLiquidationHistory.cs | 45 - .../BinanceCrossCollateralRepayHistory.cs | 64 - .../BinanceCrossCollateralRepayResult.cs | 28 - .../Futures/BinanceCrossCollateralWallet.cs | 75 - .../BinanceIsolatedMarginSymbol.cs | 8 +- .../BinanceIsolatedMarginTransfer.cs | 11 +- .../CreateIsolatedMarginAccountResult.cs | 2 + .../IsolatedMargin/IsolatedMarginAccount.cs | 27 +- .../IsolatedMarginAccountLimit.cs | 2 + .../Spot/Loans/BinanceCryptoLoanAsset.cs | 28 +- .../Spot/Loans/BinanceCryptoLoanBorrow.cs | 10 +- .../Loans/BinanceCryptoLoanBorrowRecord.cs | 13 +- .../Loans/BinanceCryptoLoanCollateralAsset.cs | 12 +- .../Spot/Loans/BinanceCryptoLoanIncome.cs | 8 +- .../Spot/Loans/BinanceCryptoLoanLtvAdjust.cs | 8 +- .../Loans/BinanceCryptoLoanLtvAdjustRecord.cs | 11 +- .../BinanceCryptoLoanMarginCallResult.cs | 10 +- .../Loans/BinanceCryptoLoanOpenBorrowOrder.cs | 11 +- .../Spot/Loans/BinanceCryptoLoanRepay.cs | 9 +- .../Spot/Loans/BinanceCryptoLoanRepayRate.cs | 8 +- .../Loans/BinanceCryptoLoanRepayRecord.cs | 12 +- .../BinanceCrossMarginCollateralRatio.cs | 5 + .../BinanceCrossMarginLeverageResult.cs | 1 + .../Spot/Margin/BinanceForcedLiquidation.cs | 16 +- .../Spot/Margin/BinanceFuturesInterestRate.cs | 4 +- .../Margin/BinanceInterestHistoryResult.cs | 13 +- .../Spot/Margin/BinanceInterestMarginData.cs | 18 +- .../Spot/Margin/BinanceInterestRateHistory.cs | 7 +- .../Margin/BinanceIsolatedMarginFeeData.cs | 14 +- .../Margin/BinanceIsolatedMarginTierData.cs | 7 + .../Spot/Margin/BinanceMarginAccount.cs | 20 +- .../Margin/BinanceMarginAccountSnapshot.cs | 10 +- .../Models/Spot/Margin/BinanceMarginAmount.cs | 3 +- .../Models/Spot/Margin/BinanceMarginAsset.cs | 12 +- .../Margin/BinanceMarginDelistSchedule.cs | 4 +- .../Spot/Margin/BinanceMarginDustAsset.cs | 18 +- .../Spot/Margin/BinanceMarginDustTransfer.cs | 18 +- .../Models/Spot/Margin/BinanceMarginLevel.cs | 6 +- .../Spot/Margin/BinanceMarginOrderOcoList.cs | 4 +- .../Models/Spot/Margin/BinanceMarginPair.cs | 11 +- .../Spot/Margin/BinanceMarginPriceIndex.cs | 4 +- .../Spot/Margin/BinanceMarginTransaction.cs | 2 +- .../Models/Spot/Margin/BinanceQueryLoan.cs | 12 +- .../Models/Spot/Margin/BinanceQueryRepay.cs | 12 +- .../Spot/Margin/BinanceSmallLiabilityAsset.cs | 10 +- .../Margin/BinanceSmallLiabilityHistory.cs | 12 +- .../Spot/Margin/BinanceTransferHistory.cs | 17 +- .../Mining/BinanceHashrateResaleDetails.cs | 13 +- .../Spot/Mining/BinanceHashrateResaleList.cs | 11 +- .../Models/Spot/Mining/BinanceMiner.cs | 8 +- .../Models/Spot/Mining/BinanceMinerDetails.cs | 7 +- .../Spot/Mining/BinanceMiningAccount.cs | 4 +- .../Spot/Mining/BinanceMiningAlgorithm.cs | 6 +- .../Models/Spot/Mining/BinanceMiningCoin.cs | 9 +- .../Spot/Mining/BinanceMiningEarning.cs | 18 +- .../Spot/Mining/BinanceMiningStatistic.cs | 13 +- .../Spot/Mining/BinanceOtherRevenueList.cs | 14 +- .../Models/Spot/Mining/BinanceRevenueList.cs | 18 +- .../BinancePortfolioMarginCollateralRate.cs | 2 + .../BinancePortfolioMarginInfo.cs | 10 +- .../BinancePortfolioMarginLoan.cs | 3 +- .../BinanceCustomizedFixedProjectPosition.cs | 88 - .../Savings/BinanceFlexibleProductPosition.cs | 78 - .../Spot/Savings/BinanceInterestHistory.cs | 35 - .../Spot/Savings/BinanceLendingAccount.cs | 69 - .../BinanceLendingChangeToDailyResult.cs | 22 - .../Savings/BinanceLendingPurchaseResult.cs | 13 - .../Models/Spot/Savings/BinanceProject.cs | 75 - .../Spot/Savings/BinancePurchaseQuotaLeft.cs | 18 - .../Spot/Savings/BinancePurchaseRecord.cs | 48 - .../Savings/BinanceRedemptionQuotaLeft.cs | 26 - .../Spot/Savings/BinanceRedemptionRecord.cs | 57 - .../Spot/Savings/BinanceSavingsProduct.cs | 62 - .../SimpleEarn/BinanceSimpleEarnAccount.cs | 12 +- .../BinanceSimpleEarnCollateralRecord.cs | 14 +- .../BinanceSimpleEarnFlexiblePosition.cs | 28 +- .../BinanceSimpleEarnFlexiblePreview.cs | 12 +- .../BinanceSimpleEarnFlexibleProduct.cs | 24 +- .../BinanceSimpleEarnFlexibleRecord.cs | 18 +- ...nanceSimpleEarnFlexibleRedemptionRecord.cs | 13 +- .../BinanceSimpleEarnFlexibleRewardRecord.cs | 10 +- .../BinanceSimpleEarnLockedPosition.cs | 24 +- .../BinanceSimpleEarnLockedPreview.cs | 20 +- .../BinanceSimpleEarnLockedProduct.cs | 30 +- .../BinanceSimpleEarnLockedRecord.cs | 22 +- ...BinanceSimpleEarnLockedRedemptionRecord.cs | 17 +- .../BinanceSimpleEarnLockedRewardRecord.cs | 10 +- .../BinanceSimpleEarnPersonalQuotaLeft.cs | 2 +- .../SimpleEarn/BinanceSimpleEarnPurchase.cs | 6 +- .../SimpleEarn/BinanceSimpleEarnRateRecord.cs | 8 +- .../SimpleEarn/BinanceSimpleEarnRedemption.cs | 4 +- .../SimpleEarn/BinanceSimpleEarnResult.cs | 2 +- .../Socket/BinanceStreamAggregatedTrade.cs | 18 +- .../Spot/Socket/BinanceStreamBalanceUpdate.cs | 6 +- .../Spot/Socket/BinanceStreamBookPrice.cs | 12 +- .../Models/Spot/Socket/BinanceStreamKline.cs | 62 +- .../Spot/Socket/BinanceStreamMiniTick.cs | 20 +- .../Spot/Socket/BinanceStreamOrderList.cs | 26 +- .../Spot/Socket/BinanceStreamOrderUpdate.cs | 78 +- .../Socket/BinanceStreamPositionsUpdate.cs | 10 +- .../Socket/BinanceStreamRollingWindowTick.cs | 30 +- .../Models/Spot/Socket/BinanceStreamTick.cs | 46 +- .../Models/Spot/Socket/BinanceStreamTrade.cs | 20 +- .../Spot/Staking/BinanceBethRateHistory.cs | 6 +- .../Spot/Staking/BinanceBethWrapHistory.cs | 14 +- .../Staking/BinanceEthRedemptionHistory.cs | 10 +- .../Spot/Staking/BinanceEthRewardsHistory.cs | 12 +- .../Spot/Staking/BinanceEthStakingAccount.cs | 4 +- .../Spot/Staking/BinanceEthStakingHistory.cs | 8 +- .../Spot/Staking/BinanceEthStakingQuota.cs | 4 +- .../Spot/Staking/BinanceStakingHistory.cs | 49 - .../Staking/BinanceStakingPersonalQuota.cs | 14 - .../Spot/Staking/BinanceStakingPosition.cs | 123 - .../Spot/Staking/BinanceStakingProduct.cs | 65 - .../Spot/Staking/BinanceStakingResult.cs | 12 +- .../Spot/SubAccountData/BinanceSubAccount.cs | 4 + .../SubAccountData/BinanceSubAccountAsset.cs | 4 +- .../BinanceSubAccountAssetTransferHistory.cs | 21 +- .../SubAccountData/BinanceSubAccountBlvt.cs | 2 + .../BinanceSubAccountDeposit.cs | 14 +- .../BinanceSubAccountDepositAddress.cs | 5 +- .../SubAccountData/BinanceSubAccountEmail.cs | 3 +- .../BinanceSubAccountFuturesDetails.cs | 27 +- .../BinanceSubAccountFuturesDetailsV2.cs | 20 +- .../BinanceSubAccountFuturesEnabled.cs | 2 + .../BinanceSubAccountFuturesPositionRisk.cs | 9 +- .../BinanceSubAccountFuturesPositionRiskV2.cs | 17 +- .../BinanceSubAccountMarginDetails.cs | 12 +- .../BinanceSubAccountMarginEnabled.cs | 2 + .../BinanceSubAccountSpotAssetsSummary.cs | 6 +- .../SubAccountData/BinanceSubAccountStatus.cs | 14 +- .../BinanceSubAccountTransaction.cs | 2 +- .../BinanceSubAccountTransfer.cs | 16 +- .../BinanceSubAccountTransferResult.cs | 3 +- .../BinanceSubAccountTransferSubAccount.cs | 14 +- ...eSubAccountUniversalTransferTransaction.cs | 24 +- .../BinanceSubAccountsFuturesSummary.cs | 19 +- .../BinanceSubAccountsMarginSummary.cs | 9 +- .../Sockets/BinanceSocketQueryResponse.cs | 2 +- Binance.Net/Usings.cs | 8 +- 880 files changed, 7485 insertions(+), 12615 deletions(-) create mode 100644 Binance.Net.UnitTests/Endpoints/Spot/Account/GetAccountVipLevelAndStatus.txt create mode 100644 Binance.Net.UnitTests/Endpoints/Spot/Account/GetCommissionRates.txt create mode 100644 Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountConfiguration.txt create mode 100644 Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfoV3.txt create mode 100644 Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetSymbolConfiguration.txt create mode 100644 Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetPositions.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeInitialLeverageAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeMarginTypeAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetAccountInfoAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBalancesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBracketsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetIncomeHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetMarginChangeHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionAdlQuantileEstimationAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionInformationAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionModeAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionMarginAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionModeAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetAggregatedTradeHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBasisAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBookPricesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetContinuousContractKlinesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetExchangeInfoAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingInfoAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingRatesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatioAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetIndexPriceKlinesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetKlinesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPriceKlinesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPricesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOrderBookAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetPricesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetRecentTradesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatioAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTickersAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortAccountRatioAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortPositionRatioAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTradeHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/AggTradeUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/BookTickerUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/ContractInfoUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/IndexPriceUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/KlineUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/LiquidationOrderUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MarkPriceUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MiniTickerUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/OrderBookUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/PartialBookUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/TickerUpdate.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAfterTimeoutAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelOrderAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetForcedOrdersAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrderAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrdersAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrderAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrdersAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetUserTradesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/PlaceOrderAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/AdjustLTVAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/BorrowAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/CustomizeMarginCallAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetBorrowHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralAssetsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralRepayRateAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetIncomeHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLoanableAssetsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLtvAdjustHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetOpenBorrowOrdersAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetRepayHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/RepayAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetCollateralRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexiblePersonalQuotaLeftAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductPositionsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRedemptionRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRewardRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionPreviewAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedPersonalQuotaLeftAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductPositionsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRedemptionRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRewardRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionPreviewAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetRateHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemFlexibleProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemLockedProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetFlexibleAutoSubscribeAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetLockedAutoSubscribeAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeFlexibleProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeLockedProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethRateHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethUnwrapHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethWrapHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRedemptionHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRewardsHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingQuotaAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/AddIpRestrictionForSubAccountApiKeyAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountMarginInterestAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountSpotAndMarginAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeIpRestrictionForSubAccountApiKeyAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountApiKeyPermissionAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCoinFuturesCommissionAdjustmentAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCommissionAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountFuturesCommissionAdjustmentAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateApiKeyForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteIpRestrictionForSubAccountApiKeyAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteSubAccountApiKeyAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableFuturesForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableLeverageTokenForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableMarginForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBnbBurnStatusForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerAccountInfoAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerCommissionRebatesRecentAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerFuturesCommissionRebatesHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetIpRestrictionForSubAccountApiKeyAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountApiKeyAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountCoinFuturesCommissionAdjustmentAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountDepositHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesAssetInfoAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesCommissionAdjustmentAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountMarginAssetInfoAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountSpotAssetInfoAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferFuturesHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryUniversalAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferFuturesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferUniversalAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/AdjustCrossCollateralLoanToValueAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/BorrowForCrossCollateralAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetAdjustCrossCollateralLoanToValueHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralBorrowHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralInformationAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralLiquidationHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralRepayHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralWalletAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetFuturesTransferHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetMaxAmountForAdjustCrossCollateralLoanToValueAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetRateAfterAdjustLoanToValueAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/RepayForCrossCollateralAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Futures/TransferFuturesAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/CancelHashrateResaleRequestAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleDetailsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerDetailsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAccountListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAlgorithmListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningCoinListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningOtherRevenueListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningRevenueListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningStatisticsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Mining/PlaceHashrateResaleRequestAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/ChangeToDailyPositionAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCryptoLoansIncomeHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCustomizedFixedProjectPositionsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFixedAndCustomizedFixedProjectListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductListAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductPositionAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyPurchaseQuotaOfFlexableProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyRedemptionQuotaOfFlexibleProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingInterestHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetPurchaseRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetRedemptionRecordsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseCustomizedFixedProjectAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseFlexibleProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/Savings/RedeemFlexibleProductAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/CreateVirtualSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableBlvtForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableFuturesForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableMarginForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetFuturesAssetTransferHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountAssetsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountBtcValuesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositAddressAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountMarginDetailsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountStatusAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForMasterAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsFuturesSummaryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsMarginSummaryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetUniversalTransferHistoryAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountFuturesAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountMarginAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToMasterAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToSubAccountAsync.txt delete mode 100644 Binance.Net.UnitTests/JsonSocketTests.cs delete mode 100644 Binance.Net.UnitTests/JsonTests.cs delete mode 100644 Binance.Net.UnitTests/RestIntergrationTest.cs delete mode 100644 Binance.Net.UnitTests/TestImplementations/JsonToObjectComparer.cs create mode 100644 Binance.Net/Converters/AccountTypeConverter.cs delete mode 100644 Binance.Net/Converters/AccountUpdateReasonConverter.cs delete mode 100644 Binance.Net/Converters/AdjustRateDirectionConverter.cs delete mode 100644 Binance.Net/Converters/AutoCloseTypeConverter.cs delete mode 100644 Binance.Net/Converters/BinanceEarningTypeConverter.cs delete mode 100644 Binance.Net/Converters/BlvtStatusConverter.cs delete mode 100644 Binance.Net/Converters/BrokerageAccountTypeConverter.cs delete mode 100644 Binance.Net/Converters/BrokerageTransferTransactionStatusConverter.cs delete mode 100644 Binance.Net/Converters/ContractTypeConverter.cs delete mode 100644 Binance.Net/Converters/DepositStatusConverter.cs delete mode 100644 Binance.Net/Converters/ExecutionTypeConverter.cs delete mode 100644 Binance.Net/Converters/FiatPaymentStatusConverter.cs delete mode 100644 Binance.Net/Converters/FiatWithdrawDepositStatusConverter.cs delete mode 100644 Binance.Net/Converters/FuturesAccountTypeConverter.cs delete mode 100644 Binance.Net/Converters/FuturesMarginChangeDirectionTypeConverter.cs delete mode 100644 Binance.Net/Converters/FuturesMarginTypeConverter.cs delete mode 100644 Binance.Net/Converters/FuturesOrderTypeConverter.cs delete mode 100644 Binance.Net/Converters/FuturesTransferStatusConverter.cs delete mode 100644 Binance.Net/Converters/FuturesTransferTypeConverter.cs delete mode 100644 Binance.Net/Converters/HashrateResaleStatusConverter.cs delete mode 100644 Binance.Net/Converters/IncomeTypeConverter.cs delete mode 100644 Binance.Net/Converters/IndicatorTypeConverter.cs delete mode 100644 Binance.Net/Converters/IsolatedMarginTransferDirectionConverter.cs delete mode 100644 Binance.Net/Converters/KlineIntervalConverter.cs delete mode 100644 Binance.Net/Converters/LendingTypeConverter.cs delete mode 100644 Binance.Net/Converters/LiquidityTypeConverter.cs delete mode 100644 Binance.Net/Converters/ListOrderStatusConverter.cs delete mode 100644 Binance.Net/Converters/ListStatusTypeConverter.cs delete mode 100644 Binance.Net/Converters/LoanIncomeTypeConverter.cs delete mode 100644 Binance.Net/Converters/MarginLevelStatusConverter.cs delete mode 100644 Binance.Net/Converters/MarginStatusConverter.cs delete mode 100644 Binance.Net/Converters/MinerStatusConverter.cs delete mode 100644 Binance.Net/Converters/OrderRejectReasonConverter.cs delete mode 100644 Binance.Net/Converters/OrderResponseTypeConverter.cs delete mode 100644 Binance.Net/Converters/OrderSideConverter.cs delete mode 100644 Binance.Net/Converters/OrderStatusConverter.cs delete mode 100644 Binance.Net/Converters/PeriodIntervalConverter.cs delete mode 100644 Binance.Net/Converters/PositionModeConverter.cs delete mode 100644 Binance.Net/Converters/PositionSideConverter.cs delete mode 100644 Binance.Net/Converters/ProductStatusConverter.cs delete mode 100644 Binance.Net/Converters/ProjectStatusConverter.cs delete mode 100644 Binance.Net/Converters/ProjectTypeConverter.cs delete mode 100644 Binance.Net/Converters/RateLimitConverter.cs delete mode 100644 Binance.Net/Converters/RedeemTypeConverter.cs delete mode 100644 Binance.Net/Converters/SideEffectTypeConverter.cs delete mode 100644 Binance.Net/Converters/SpotOrderTypeConverter.cs delete mode 100644 Binance.Net/Converters/SubAccountFuturesTransferTypeConverter.cs delete mode 100644 Binance.Net/Converters/SubAccountMarginTransferTypeConverter.cs delete mode 100644 Binance.Net/Converters/SubAccountTransferSubAccountTypeConverter.cs delete mode 100644 Binance.Net/Converters/SymbolFilterTypeConverter.cs delete mode 100644 Binance.Net/Converters/SymbolStatusConverter.cs delete mode 100644 Binance.Net/Converters/SystemStatusConverter.cs delete mode 100644 Binance.Net/Converters/TimeInForceConverter.cs delete mode 100644 Binance.Net/Converters/TransferAccountTypeConverter.cs delete mode 100644 Binance.Net/Converters/TransferDirectionConverter.cs delete mode 100644 Binance.Net/Converters/TransferDirectionTypeConverter.cs delete mode 100644 Binance.Net/Converters/UnderlyingTypeConverter.cs delete mode 100644 Binance.Net/Converters/UniversalTransferTypeConverter.cs delete mode 100644 Binance.Net/Converters/WalletTypeConverter.cs delete mode 100644 Binance.Net/Converters/WithdrawDepositTransferTypeConverter.cs delete mode 100644 Binance.Net/Converters/WithdrawalStatusConverter.cs delete mode 100644 Binance.Net/Converters/WorkingTypeConverter.cs rename Binance.Net/Enums/{BinanceBusdConvertType.cs => BusdConvertType.cs} (95%) rename Binance.Net/Enums/{BinanceEarningType.cs => EarningType.cs} (78%) rename Binance.Net/{Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositStatus.cs => Enums/SubAccountDepositStatus.cs} (56%) delete mode 100644 Binance.Net/Enums/SubAccountTransferType.cs create mode 100644 Binance.Net/Objects/Models/Futures/BinanceFuturesAccountConfiguration.cs create mode 100644 Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfoV3.cs delete mode 100644 Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolFilter.cs create mode 100644 Binance.Net/Objects/Models/Futures/BinancePositionV3.cs create mode 100644 Binance.Net/Objects/Models/Futures/BinanceSymbolConfiguration.cs create mode 100644 Binance.Net/Objects/Models/Spot/BinanceCommissions.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesType.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvHistory.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvResult.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustMaxAmounts.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAfterAdjust.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowHistory.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowResult.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInformation.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInterestHistory.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralLiquidationHistory.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayHistory.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayResult.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralWallet.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceCustomizedFixedProjectPosition.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceFlexibleProductPosition.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceInterestHistory.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceLendingAccount.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceLendingChangeToDailyResult.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceLendingPurchaseResult.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceProject.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseQuotaLeft.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseRecord.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionQuotaLeft.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionRecord.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Savings/BinanceSavingsProduct.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Staking/BinanceStakingHistory.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPersonalQuota.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPosition.cs delete mode 100644 Binance.Net/Objects/Models/Spot/Staking/BinanceStakingProduct.cs diff --git a/Binance.Net.UnitTests/BinanceClientTests.cs b/Binance.Net.UnitTests/BinanceClientTests.cs index ff26761c8..3c1984148 100644 --- a/Binance.Net.UnitTests/BinanceClientTests.cs +++ b/Binance.Net.UnitTests/BinanceClientTests.cs @@ -2,7 +2,6 @@ using CryptoExchange.Net.Authentication; using CryptoExchange.Net.Requests; using Moq; -using Newtonsoft.Json; using NUnit.Framework; using System; using System.Collections.Generic; @@ -16,10 +15,8 @@ using Binance.Net.Objects.Options; using NUnit.Framework.Legacy; using CryptoExchange.Net.Clients; -using CryptoExchange.Net.Converters.JsonNet; -using System.Linq.Expressions; -using System.Threading; -using CryptoExchange.Net; +using CryptoExchange.Net.Converters.SystemTextJson; +using System.Text.Json; namespace Binance.Net.UnitTests { @@ -33,7 +30,7 @@ public async Task GetServerTime_Should_RespondWithServerTimeDateTime(long milise // arrange DateTime expected = new DateTime(1970, 1, 1).AddMilliseconds(milisecondsTime); var time = new BinanceCheckTime() { ServerTime = expected }; - var client = TestHelpers.CreateResponseClient(JsonConvert.SerializeObject(time)); + var client = TestHelpers.CreateResponseClient(JsonSerializer.Serialize(time)); // act var result = await client.SpotApi.ExchangeData.GetServerTimeAsync(); @@ -200,7 +197,7 @@ public void CheckSignatureExample1() { "price", "0.1" }, { "recvWindow", "5000" }, }, - DateTimeConverter.ParseFromLong(1499827319559), + DateTimeConverter.ParseFromString("1499827319559"), true, false); } @@ -231,7 +228,7 @@ public void CheckSignatureExample2() { "price", "0.1" }, { "recvWindow", "5000" }, }, - DateTimeConverter.ParseFromLong(1499827319559), + DateTimeConverter.ParseFromString("1499827319559"), true, false); } diff --git a/Binance.Net.UnitTests/BinanceRestIntegrationTests.cs b/Binance.Net.UnitTests/BinanceRestIntegrationTests.cs index 962698d4f..1ed813e55 100644 --- a/Binance.Net.UnitTests/BinanceRestIntegrationTests.cs +++ b/Binance.Net.UnitTests/BinanceRestIntegrationTests.cs @@ -1,12 +1,9 @@ using Binance.Net.Clients; -using CryptoExchange.Net.Objects; +using CryptoExchange.Net.Testing; using Microsoft.Extensions.Logging; using NUnit.Framework; using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; using System.Threading; using System.Threading.Tasks; @@ -87,6 +84,7 @@ public async Task TestSpotAccount() await RunAndCheckResult(client => client.SpotApi.Account.GetIsolatedMarginFeeDataAsync(default, default, default, default), true); await RunAndCheckResult(client => client.SpotApi.Account.GetTradeFeeAsync(default, default, default), true); await RunAndCheckResult(client => client.SpotApi.Account.GetAccountVipLevelAndStatusAsync(default, default), true); + await RunAndCheckResult(client => client.SpotApi.Account.GetCommissionRatesAsync("ETHUSDT", default, default), true); // Not available without margin account //await RunAndCheckResult(client => client.SpotApi.Account.GetMarginTransferHistoryAsync(Enums.TransferDirection.RollOut, default, default, default, default, default, default, default), true); @@ -109,7 +107,7 @@ public async Task TestSpotExchangeData() await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetServerTimeAsync(CancellationToken.None), false); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetExchangeInfoAsync(CancellationToken.None), false); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetSystemStatusAsync(CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetAssetDetailsAsync(5000, CancellationToken.None), false); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetAssetDetailsAsync(5000, CancellationToken.None), true); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetProductsAsync(CancellationToken.None), false); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetOrderBookAsync("ETHUSDT", 1, CancellationToken.None), false); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetRecentTradesAsync("ETHUSDT", 1, CancellationToken.None), false); @@ -125,17 +123,17 @@ public async Task TestSpotExchangeData() await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetPriceAsync("ETHUSDT", CancellationToken.None), false); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetPricesAsync(CancellationToken.None), false); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetBookPriceAsync("ETHUSDT", CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetMarginAssetsAsync(null, CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetMarginSymbolsAsync(null, CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetMarginPriceIndexAsync("ETHUSDT", CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetIsolatedMarginSymbolsAsync("ETHUSDT", 5000, CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetLeveragedTokenInfoAsync(5000, CancellationToken.None), false); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetMarginAssetsAsync(null, CancellationToken.None), true); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetMarginSymbolsAsync(null, CancellationToken.None), true); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetMarginPriceIndexAsync("ETHUSDT", CancellationToken.None), true); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetIsolatedMarginSymbolsAsync("ETHUSDT", 5000, CancellationToken.None), true); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetLeveragedTokenInfoAsync(5000, CancellationToken.None), true); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetLeveragedTokensHistoricalKlinesAsync("ETHUP", Enums.KlineInterval.OneHour, null, null, null, null, CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetCrossMarginCollateralRatioAsync(null, CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetFutureHourlyInterestRateAsync(new[] { "ETH" }, false, null, CancellationToken.None), false); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetCrossMarginCollateralRatioAsync(null, CancellationToken.None), true); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetFutureHourlyInterestRateAsync(new[] { "ETH" }, false, null, CancellationToken.None), true); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetMarginDelistScheduleAsync(null, CancellationToken.None), false); await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetConvertListAllPairsAsync(null, null, CancellationToken.None), false); - await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetDelistScheduleAsync(null, CancellationToken.None), false); + await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetDelistScheduleAsync(null, CancellationToken.None), true); // Needs more permissions //await RunAndCheckResult(client => client.SpotApi.ExchangeData.GetConvertQuantityPrecisionPerAssetAsync(null, CancellationToken.None), false); @@ -174,7 +172,7 @@ public async Task TestUsdFuturesAccount() await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetIncomeHistoryAsync(default, default, default, default, default, default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetBracketsAsync(default, default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetPositionAdlQuantileEstimationAsync(default, default, default), true); - await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetAccountInfoAsync(default, default), true); + await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetAccountInfoAsync(default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetBalancesAsync(default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetMultiAssetsModeAsync(default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetPositionInformationAsync(default, default, default), true); @@ -182,6 +180,8 @@ public async Task TestUsdFuturesAccount() await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetUserCommissionRateAsync("ETHUSDT", default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetOrderRateLimitAsync(default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetBnbBurnStatusAsync(default, default), true); + await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetSymbolConfigurationAsync(default, default), true); + await RunAndCheckResult(client => client.UsdFuturesApi.Account.GetAccountConfigurationAsync(default), true); } [Test] @@ -192,7 +192,7 @@ public async Task TestUsdFuturesExchangeData() await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetExchangeInfoAsync(CancellationToken.None), false); await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetOrderBookAsync("ETHUSDT", 5, CancellationToken.None), false); await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetRecentTradesAsync("ETHUSDT", 1, CancellationToken.None), false); - await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetTradeHistoryAsync("ETHUSDT", 1, null, CancellationToken.None), false); + await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetTradeHistoryAsync("ETHUSDT", 1, null, CancellationToken.None), true); await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetAggregatedTradeHistoryAsync("ETHUSDT", null, null, null, 10, CancellationToken.None), false); await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetFundingInfoAsync(CancellationToken.None), false); await RunAndCheckResult(client => client.UsdFuturesApi.ExchangeData.GetFundingRatesAsync("ETHUSDT", null, null, null, CancellationToken.None), false); @@ -227,6 +227,7 @@ public async Task TestUsdFuturesTrading() await RunAndCheckResult(client => client.UsdFuturesApi.Trading.GetUserTradesAsync("ETHUSDT", default, default, default, default, default, default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Trading.GetOpenAlgoOrdersAsync(default, default), true); await RunAndCheckResult(client => client.UsdFuturesApi.Trading.GetClosedAlgoOrdersAsync(default, default, default, default, default, default, default, default), true); + await RunAndCheckResult(client => client.UsdFuturesApi.Trading.GetPositionsAsync(default, default), true); } [Test] @@ -251,7 +252,7 @@ public async Task TestCoinFuturesExchangeData() await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetExchangeInfoAsync(CancellationToken.None), false); await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetOrderBookAsync("ETHUSD_PERP", 5, CancellationToken.None), false); await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetRecentTradesAsync("ETHUSD_PERP", 1, CancellationToken.None), false); - await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetTradeHistoryAsync("ETHUSD_PERP", 1, null, CancellationToken.None), false); + await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetTradeHistoryAsync("ETHUSD_PERP", 1, null, CancellationToken.None), true); await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetAggregatedTradeHistoryAsync("ETHUSD_PERP", null, null, null, 10, CancellationToken.None), false); await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetKlinesAsync("ETHUSD_PERP", Enums.KlineInterval.OneHour, DateTime.UtcNow.AddDays(-1), DateTime.UtcNow, 1, CancellationToken.None), false); await RunAndCheckResult(client => client.CoinFuturesApi.ExchangeData.GetTickersAsync(null, null, CancellationToken.None), false); diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/ChangeInitialLeverage.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/ChangeInitialLeverage.txt index 74000bf34..f0129cdcd 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/ChangeInitialLeverage.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/ChangeInitialLeverage.txt @@ -3,6 +3,6 @@ POST true { "leverage": 21, - "maxQty": "1000", // maximum quantity of base asset + "maxQty": "1000", "symbol": "BTCUSD_200925" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetAccountInfo.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetAccountInfo.txt index 1811f88a6..7eb8f2147 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetAccountInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetAccountInfo.txt @@ -4,25 +4,25 @@ true { "assets": [ { - "asset": "BTC", // asset name - "walletBalance": "0.00241969", // total wallet balance - "unrealizedProfit": "0.00000000", // unrealized profit or loss - "marginBalance": "0.00241969", // margin balance - "maintMargin": "0.00000000", // maintenance margin - "initialMargin": "0.00000000", // total intial margin required with the latest mark price - "positionInitialMargin": "0.00000000", // positions margin required with the latest mark price - "openOrderInitialMargin": "0.00000000", // open orders intial margin required with the latest mark price - "maxWithdrawAmount": "0.00241969", // available amount for transfer out - "crossWalletBalance": "0.00241969", // wallet balance for crossed margin - "crossUnPnl": "0.00000000", // total unrealized profit or loss of crossed positions - "availableBalance": "0.00241969", // available margin balance - "updateTime": 1625474304765 //update time + "asset": "BTC", + "walletBalance": "0.00241969", + "unrealizedProfit": "0.00000000", + "marginBalance": "0.00241969", + "maintMargin": "0.00000000", + "initialMargin": "0.00000000", + "positionInitialMargin": "0.00000000", + "openOrderInitialMargin": "0.00000000", + "maxWithdrawAmount": "0.00241969", + "crossWalletBalance": "0.00241969", + "crossUnPnl": "0.00000000", + "availableBalance": "0.00241969", + "updateTime": 1625474304765 } ], "positions": [ { "symbol": "BTCUSD_201225", - "positionAmt":"0", // position amount + "positionAmt":"0", "initialMargin": "0", "maintMargin": "0", "unrealizedProfit": "0.00000000", @@ -30,10 +30,10 @@ true "openOrderInitialMargin": "0", "leverage": "125", "isolated": false, - "positionSide": "BOTH", // BOTH means that it is the position of Oneway Mode + "positionSide": "BOTH", "entryPrice": "0.0", - "breakEvenPrice": "0.0", // breakeven price - "maxQty": "50", // maximum quantity of base asset + "breakEvenPrice": "0.0", + "maxQty": "50", "updateTime": 0 }, { @@ -46,9 +46,9 @@ true "openOrderInitialMargin": "0", "leverage": "125", "isolated": false, - "positionSide": "LONG", // LONG or SHORT means that it is the position of Hedge Mode + "positionSide": "LONG", "entryPrice": "0.0", - "breakEvenPrice": "0.0", // breakeven price + "breakEvenPrice": "0.0", "maxQty": "50", "updateTime": 0 }, @@ -62,9 +62,9 @@ true "openOrderInitialMargin": "0", "leverage": "125", "isolated": false, - "positionSide": "SHORT", // LONG or SHORT means that it is the position of Hedge Mode + "positionSide": "SHORT", "entryPrice": "0.0", - "breakEvenPrice": "0.0", // breakeven price + "breakEvenPrice": "0.0", "maxQty": "50", "updateTime":1627026881327 } diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBalances.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBalances.txt index fa262774e..059cd794b 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBalances.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBalances.txt @@ -3,7 +3,7 @@ GET true [ { - "accountAlias": "SgsR", // unique account code + "accountAlias": "SgsR", "asset": "BTC", "balance": "0.00250000", "withdrawAvailable": "0.00250000", diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBrackets.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBrackets.txt index 2ad97079e..9c48f3bfb 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBrackets.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetBrackets.txt @@ -4,16 +4,16 @@ true [ { "symbol": "BTCUSD_PERP", - "notionalCoef": 1.50, //user symbol bracket multiplier, only appears when user's symbol bracket is adjusted + "notionalCoef": 1.50, "brackets": [ { - "bracket": 1, // bracket level - "initialLeverage": 125, // the maximum leverage - "qtyCap": 50, // upper edge of base asset quantity - "qtylFloor": 0, // lower edge of base asset quantity - "maintMarginRatio": 0.004, // maintenance margin rate - "cum": 0.0 // Auxiliary number for quick calculation - }, + "bracket": 1, + "initialLeverage": 125, + "qtyCap": 50, + "qtylFloor": 0, + "maintMarginRatio": 0.004, + "cum": 0.0 + } ] } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadIdForTransactionHistory.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadIdForTransactionHistory.txt index a2664d70d..c6984faa7 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadIdForTransactionHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadIdForTransactionHistory.txt @@ -2,6 +2,6 @@ GET /dapi/v1/income/asyn true { - "avgCostTimestampOfLast30d":7241837, // Average time taken for data download in the past 30 days - "downloadId":"546975389218332672", + "avgCostTimestampOfLast30d":7241837, + "downloadId":"546975389218332672" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadLinkForTransactionHistory.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadLinkForTransactionHistory.txt index d5767c3d2..1786fc50e 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadLinkForTransactionHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetDownloadLinkForTransactionHistory.txt @@ -3,9 +3,9 @@ GET true { "downloadId":"545923594199212032", - "status":"completed", // Enum completed processing - "url":"www.binance.com", // The link is mapped to download id - "notified":true, // ignore - "expirationTimestamp":1645009771000, // The link would expire after this timestamp - "isExpired":null, -} \ No newline at end of file + "status":"completed", + "url":"www.binance.com", + "notified":true, + "expirationTimestamp":1645009771000, + "isExpired":null + } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetIncomeHistory.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetIncomeHistory.txt index 63755db96..0cc899524 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetIncomeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetIncomeHistory.txt @@ -3,14 +3,14 @@ GET true [ { - "symbol": "", // trade symbol, if existing - "incomeType": "TRANSFER", // income type - "income": "-0.37500000", // income amount - "asset": "BTC", // income asset - "info":"WITHDRAW", // extra information + "symbol": "", + "incomeType": "TRANSFER", + "income": "-0.37500000", + "asset": "BTC", + "info":"WITHDRAW", "time": 1570608000000, - "tranId":"9689322392", // transaction id - "tradeId":"" // trade id, if existing + "tranId":"9689322392", + "tradeId":"" }, { "symbol": "BTCUSD_200925", diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionAdlQuantileEstimation.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionAdlQuantileEstimation.txt index ecde571ac..ed2893abd 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionAdlQuantileEstimation.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionAdlQuantileEstimation.txt @@ -6,20 +6,19 @@ true "symbol": "BTCUSD_200925", "adlQuantile": { - // if the positions of the symbol are crossed margined in Hedge Mode, "LONG" and "SHORT" will be returned a same quantile value, and "HEDGE" will be returned instead of "BOTH". + "LONG": 3, "SHORT": 3, - "HEDGE": 0 // only a sign, ignore the value + "HEDGE": 0 } }, { "symbol": "BTCUSD_201225", "adlQuantile": { - // for positions of the symbol are in One-way Mode or isolated margined in Hedge Mode - "LONG": 1, // adl quantile for "LONG" position in hedge mode - "SHORT": 2, // adl qauntile for "SHORT" position in hedge mode - "BOTH": 0 // adl qunatile for position in one-way mode + "LONG": 1, + "SHORT": 2, + "BOTH": 0 } } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionInformation.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionInformation.txt index 535a411ed..ff3b4fbe5 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionInformation.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetPositionInformation.txt @@ -6,12 +6,12 @@ true "symbol": "BTCUSD_201225", "positionAmt": "0", "entryPrice": "0.0", - "breakEvenPrice": "0.0", // break-even price + "breakEvenPrice": "0.0", "markPrice": "0.00000000", "unRealizedProfit": "0.00000000", "liquidationPrice": "0", "leverage": "125", - "maxQty": "50", // maximum quantity of base asset + "maxQty": "50", "marginType": "cross", "isolatedMargin": "0.00000000", "isAutoAddMargin": "false", @@ -23,7 +23,7 @@ true "symbol": "BTCUSD_201225", "positionAmt": "1", "entryPrice": "11707.70000003", - "breakEvenPrice": "11707.80000005", // break-even price + "breakEvenPrice": "11707.80000005", "markPrice": "11788.66626667", "unRealizedProfit": "0.00005866", "liquidationPrice": "11667.63509587", @@ -40,7 +40,7 @@ true "symbol": "BTCUSD_201225", "positionAmt": "0", "entryPrice": "0.0", - "breakEvenPrice": "0.0", // break-even price + "breakEvenPrice": "0.0", "markPrice": "0.00000000", "unRealizedProfit": "0.00000000", "liquidationPrice": "0", diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetUserCommissionRate.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetUserCommissionRate.txt index 78542764e..a7cc33919 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetUserCommissionRate.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Account/GetUserCommissionRate.txt @@ -3,6 +3,6 @@ GET true { "symbol": "BTCUSD_PERP", - "makerCommissionRate": "0.00015", // 0.015% - "takerCommissionRate": "0.00040" // 0.040% + "makerCommissionRate": "0.00015", + "takerCommissionRate": "0.00040" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetAggregatedTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetAggregatedTradeHistory.txt index 672653103..1d31593ea 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetAggregatedTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetAggregatedTradeHistory.txt @@ -3,12 +3,12 @@ GET false [ { - "a": 416690, // Aggregate tradeId - "p": "9642.4", // Price - "q": "3", // Quantity - "f": 595259, // First tradeId - "l": 595259, // Last tradeId - "T": 1591250548649, // Timestamp - "m": false, // Was the buyer the maker? + "a": 416690, + "p": "9642.4", + "q": "3", + "f": 595259, + "l": 595259, + "T": 1591250548649, + "m": false } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetContinuousContractKlines.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetContinuousContractKlines.txt index 188160752..fe1cb4edb 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetContinuousContractKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetContinuousContractKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1591258320000, // Open time - "9640.7", // Open - "9642.4", // High - "9640.6", // Low - "9642.0", // Close (or latest price) - "206", // Volume - 1591258379999, // Close time - "2.13660389", // Base asset volume - 48, // Number of trades - "119", // Taker buy volume - "1.23424865", // Taker buy base asset volume - "0" // Ignore. + 1591258320000, + "9640.7", + "9642.4", + "9640.6", + "9642.0", + "206", + 1591258379999, + "2.13660389", + 48, + "119", + "1.23424865", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetExchangeInfo.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetExchangeInfo.txt index a64210a0d..d005afc1b 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetExchangeInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetExchangeInfo.txt @@ -17,8 +17,8 @@ false "rateLimitType": "ORDERS" } ], - "serverTime": 1565613908500, // Ignore please. If you want to check current server time, please check via "GET /dapi/v1/time" - "symbols": [ // contract symbols + "serverTime": 1565613908500, + "symbols": [ { "filters": [ { @@ -63,10 +63,10 @@ false "FOK", "GTX" ], - "liquidationFee": "0.010000", // liquidation fee rate - "marketTakeBound": "0.30", // the max price difference rate( from mark price) a market order can make - "symbol": "BTCUSD_200925", // contract symbol name - "pair": "BTCUSD", // underlying symbol + "liquidationFee": "0.010000", + "marketTakeBound": "0.30", + "symbol": "BTCUSD_200925", + "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "deliveryDate": 1601020800000, "onboardDate": 1590739200000, @@ -75,14 +75,14 @@ false "quoteAsset": "USD", "baseAsset": "BTC", "marginAsset": "BTC", - "pricePrecision": 1, // please do not use it as tickSize - "quantityPrecision": 0, // please do not use it as stepSize + "pricePrecision": 1, + "quantityPrecision": 0, "baseAssetPrecision": 8, "quotePrecision": 8, - "equalQtyPrecision": 4, // ignore - "triggerProtect": "0.0500", // threshold for algo order with "priceProtect" - "maintMarginPercent": "2.5000", // ignore - "requiredMarginPercent": "5.0000", // ignore + "equalQtyPrecision": 4, + "triggerProtect": "0.0500", + "maintMarginPercent": "2.5000", + "requiredMarginPercent": "5.0000", "underlyingType": "COIN", "underlyingSubType": [] } diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingInfo.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingInfo.txt index c116f2e55..802d0cf28 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingInfo.txt @@ -7,6 +7,6 @@ false "adjustedFundingRateCap": "0.02500000", "adjustedFundingRateFloor": "-0.02500000", "fundingIntervalHours": 8, - "disclaimer": false // ingore + "disclaimer": false } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingRates.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingRates.txt index 45bd3b26d..15f995059 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingRates.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetFundingRates.txt @@ -6,7 +6,7 @@ false "symbol": "BTCUSD_PERP", "fundingTime": 1698768000000, "fundingRate": "-0.00300000", - "markPrice": "34651.40000000" // mark price associated with a particular funding fee charge + "markPrice": "34651.40000000" }, { "symbol": "BTCUSD_PERP", diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt index 12e1f2791..4af1fef84 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt @@ -5,8 +5,8 @@ false { "pair": "BTCUSD", "longShortRatio": "0.1960", - "longAccount": "0.6622", //66.22% - "shortAccount": "0.3378", //33.78% + "longAccount": "0.6622", + "shortAccount": "0.3378", "timestamp": 1583139600000 }, { diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetIndexPriceKlines.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetIndexPriceKlines.txt index 5a19ca556..a621126c0 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetIndexPriceKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetIndexPriceKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1591256400000, // Open time - "9653.69440000", // Open - "9653.69640000", // High - "9651.38600000", // Low - "9651.55200000", // Close (or latest price) - "0 ", // Ignore - 1591256459999, // Close time - "0", // Ignore - 60, // Number of bisic data - "0", // Ignore - "0", // Ignore - "0" // Ignore + 1591256400000, + "9653.69440000", + "9653.69640000", + "9651.38600000", + "9651.55200000", + "0 ", + 1591256459999, + "0", + 60, + "0", + "0", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetKlines.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetKlines.txt index 0ae94f3fb..1426e5a65 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1591258320000, // Open time - "9640.7", // Open - "9642.4", // High - "9640.6", // Low - "9642.0", // Close (or latest price) - "206", // Volume - 1591258379999, // Close time - "2.13660389", // Base asset volume - 48, // Number of trades - "119", // Taker buy volume - "1.23424865", // Taker buy base asset volume - "0" // Ignore. + 1591258320000, + "9640.7", + "9642.4", + "9640.6", + "9642.0", + "206", + 1591258379999, + "2.13660389", + 48, + "119", + "1.23424865", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPriceKlines.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPriceKlines.txt index e05677cc5..82b01fafa 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPriceKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPriceKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1591256460000, // Open time - "9653.29201333", // Open - "9654.56401333", // High - "9653.07367333", // Low - "9653.07367333", // Close (or latest price) - "0 ", // Ignore - 1591256519999, // Close time - "0", // Ignore - 60, // Number of bisic data - "0", // Ignore - "0", // Ignore - "0" // Ignore + 1591256460000, + "9653.29201333", + "9654.56401333", + "9653.07367333", + "9653.07367333", + "0 ", + 1591256519999, + "0", + 60, + "0", + "0", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPrices.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPrices.txt index 7d6f5f5cd..4c9aa7373 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPrices.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetMarkPrices.txt @@ -5,12 +5,12 @@ false { "symbol": "BTCUSD_PERP", "pair": "BTCUSD", - "markPrice": "11029.69574559", // mark price - "indexPrice": "10979.14437500", // index price - "estimatedSettlePrice": "10981.74168236", // Estimated Settle Price, only useful in the last hour before the settlement starts. - "lastFundingRate": "0.00071003", // the lasted funding rate, for perpetual contract symbols only. For delivery symbols, "" will be shown. - "interestRate": "0.00010000", // the base asset interest rate, for perpetual contract symbols only. For delivery symbols, "" will be shown. - "nextFundingTime": 1596096000000, // For perpetual contract symbols only. For delivery symbols, 0 will be shown + "markPrice": "11029.69574559", + "indexPrice": "10979.14437500", + "estimatedSettlePrice": "10981.74168236", + "lastFundingRate": "0.00071003", + "interestRate": "0.00010000", + "nextFundingTime": 1596096000000, "time": 1596094042000 }, { diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOpenInterestHistory.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOpenInterestHistory.txt index 87a71cf17..4daf8d95b 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOpenInterestHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOpenInterestHistory.txt @@ -5,8 +5,8 @@ false { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", - "sumOpenInterest": "20403", //unit: cont - "sumOpenInterestValue": "176196512.23400000", //unit: base asset + "sumOpenInterest": "20403", + "sumOpenInterestValue": "176196512.23400000", "timestamp": 1591261042378 }, { diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOrderBook.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOrderBook.txt index 346cbef87..5ae85cf81 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOrderBook.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetOrderBook.txt @@ -3,14 +3,14 @@ GET false { "lastUpdateId": 16769853, - "symbol": "BTCUSD_PERP", // Symbol - "pair": "BTCUSD", // Pair - "E": 1591250106370, // Message output time - "T": 1591250106368, // Transaction time + "symbol": "BTCUSD_PERP", + "pair": "BTCUSD", + "E": 1591250106370, + "T": 1591250106368, "bids": [ [ - "9638.0", // PRICE - "431" // QTY + "9638.0", + "431" ] ], "asks": [ diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetPrices.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetPrices.txt index 1a6ea9272..424f81b61 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetPrices.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetPrices.txt @@ -4,7 +4,7 @@ false [ { "symbol": "BTCUSD_200626", - "ps": "9647.8", // pair + "ps": "9647.8", "price": "9647.8", "time": 1591257246176 } diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetRecentTrades.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetRecentTrades.txt index 10469b79c..c22ba664f 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetRecentTrades.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetRecentTrades.txt @@ -8,6 +8,6 @@ false "qty": "1", "baseQty": "0.01037883", "time": 1591250192508, - "isBuyerMaker": true, + "isBuyerMaker": true } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt index ee7c2a98d..e6d2d4edc 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt @@ -5,19 +5,19 @@ false { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", - "takerBuyVol": "387", //unit: cont - "takerSellVol": "248", //unit: cont - "takerBuyVolValue": "2342.1220", //unit: base asset - "takerSellVolValue": "4213.9800", //unit: base asset + "takerBuyVol": "387", + "takerSellVol": "248", + "takerBuyVolValue": "2342.1220", + "takerSellVolValue": "4213.9800", "timestamp": 1591261042378 }, { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", - "takerBuyVol": "234", //unit: cont - "takerSellVol": "121", //unit: cont - "takerBuyVolValue": "4563.1320", //unit: base asset - "takerSellVolValue": "3313.3940", //unit: base asset + "takerBuyVol": "234", + "takerSellVol": "121", + "takerBuyVolValue": "4563.1320", + "takerSellVolValue": "3313.3940", "timestamp": 1585615200000 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTickers.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTickers.txt index b02cf9b5a..58798bc0a 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTickers.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTickers.txt @@ -17,8 +17,8 @@ false "baseVolume": "5192.94797687", "openTime": 1591170300000, "closeTime": 1591256718418, - "firstId": 600507, // First tradeId - "lastId": 697803, // Last tradeId - "count": 97297 // Trade count + "firstId": 600507, + "lastId": 697803, + "count": 97297 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortAccountRatio.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortAccountRatio.txt index 4d6d7f5d3..14e1e4316 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortAccountRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortAccountRatio.txt @@ -5,8 +5,8 @@ false { "pair": "BTCUSD", "longShortRatio": "1.8105", - "longAccount": "0.6442", //64.42% - "shortAccount": "0.3558", //35.58% + "longAccount": "0.6442", + "shortAccount": "0.3558", "timestamp": 1591261042378 }, { diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortPositionRatio.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortPositionRatio.txt index 40cf88d13..26ba7b73d 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortPositionRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTopLongShortPositionRatio.txt @@ -5,8 +5,8 @@ false { "pair": "BTCUSD", "longShortRatio": "0.7869", - "longPosition": "0.6442", //64.42% - "shortPosition": "0.4404", //44.04% + "longPosition": "0.6442", + "shortPosition": "0.4404", "timestamp": 1592870400000 }, { diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTradeHistory.txt index fd2b94032..60631ae89 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/ExchangeData/GetTradeHistory.txt @@ -8,6 +8,6 @@ false "qty": "1", "baseQty": "0.01037108", "time": 1499865549590, - "isBuyerMaker": true, + "isBuyerMaker": true } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelMultipleOrders.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelMultipleOrders.txt index 651fa7eb4..05ac47c7d 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelMultipleOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelMultipleOrders.txt @@ -16,15 +16,15 @@ true "side": "BUY", "positionSide": "SHORT", "status": "CANCELED", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSD_200925", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected + "priceProtect": false, "updateTime": 1571110484038 }, { diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelOrder.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelOrder.txt index aeed13974..c2834e750 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/CancelOrder.txt @@ -15,15 +15,15 @@ true "side": "BUY", "positionSide": "SHORT", "status": "CANCELED", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1571110484038, "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected + "priceProtect": false } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrder.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrder.txt index cbcbb84ed..e7703c087 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrder.txt @@ -14,16 +14,16 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected + "priceProtect": false } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrders.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrders.txt index bc5131443..da07fa7ca 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOpenOrders.txt @@ -15,16 +15,16 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSD_200925", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time + "activatePrice": "9020", + "priceRate": "0.3", + "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected + "priceProtect": false } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrder.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrder.txt index 4e1fb0aae..d568b552c 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrder.txt @@ -13,16 +13,16 @@ true "reduceOnly": false, "side": "BUY", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time + "activatePrice": "9020", + "priceRate": "0.3", + "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected + "priceProtect": false } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrders.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrders.txt index 771e6e083..61b78399e 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetOrders.txt @@ -15,17 +15,17 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time + "activatePrice": "9020", + "priceRate": "0.3", + "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected + "priceProtect": false } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetUserTrades.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetUserTrades.txt index fffac023b..34719e171 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetUserTrades.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/GetUserTrades.txt @@ -3,21 +3,21 @@ GET true [ { - 'symbol': 'BTCUSD_200626', - 'id': 6, - 'orderId': 28, - 'pair': 'BTCUSD', - 'side': 'SELL', - 'price': '8800', - 'qty': '1', - 'realizedPnl': '0', - 'marginAsset': 'BTC', - 'baseQty': '0.01136364', - 'commission': '0.00000454', - 'commissionAsset': 'BTC', - 'time': 1590743483586, - 'positionSide': 'BOTH', - 'buyer': false, - 'maker': false + "symbol": "BTCUSD_200626", + "id": 6, + "orderId": 28, + "pair": "BTCUSD", + "side": "SELL", + "price": "8800", + "qty": "1", + "realizedPnl": "0", + "marginAsset": "BTC", + "baseQty": "0.01136364", + "commission": "0.00000454", + "commissionAsset": "BTC", + "time": 1590743483586, + "positionSide": "BOTH", + "buyer": false, + "maker": false } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceMultipleOrders.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceMultipleOrders.txt index 64d8fef37..2fa748427 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceMultipleOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceMultipleOrders.txt @@ -15,17 +15,17 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET + "stopPrice": "9300", "symbol": "BTCUSD_200925", "pair": "BTCUSD", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "origType": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1566818724722, "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected + "priceProtect": false }, { "code": -2022, diff --git a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceOrder.txt b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceOrder.txt index 5fe873826..e8ce0e7fe 100644 --- a/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/CoinFutures/Trading/PlaceOrder.txt @@ -14,16 +14,16 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "origType": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1566818724722, "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected + "priceProtect": false } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/General/Brokerage/AddIpRestrictionForSubAccountApiKey.txt b/Binance.Net.UnitTests/Endpoints/General/Brokerage/AddIpRestrictionForSubAccountApiKey.txt index 2c5f4b0fb..e20a8df5e 100644 --- a/Binance.Net.UnitTests/Endpoints/General/Brokerage/AddIpRestrictionForSubAccountApiKey.txt +++ b/Binance.Net.UnitTests/Endpoints/General/Brokerage/AddIpRestrictionForSubAccountApiKey.txt @@ -5,7 +5,7 @@ true "status": "2", "ipList": [ "69.210.67.14", - "8.34.21.10" //only return if you open IP restriction and input IP address. + "8.34.21.10" ], "updateTime": 1636371437000, "apiKey": "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" diff --git a/Binance.Net.UnitTests/Endpoints/General/Brokerage/GetSubAccounts.txt b/Binance.Net.UnitTests/Endpoints/General/Brokerage/GetSubAccounts.txt index 272e42661..3e4adba1c 100644 --- a/Binance.Net.UnitTests/Endpoints/General/Brokerage/GetSubAccounts.txt +++ b/Binance.Net.UnitTests/Endpoints/General/Brokerage/GetSubAccounts.txt @@ -8,8 +8,8 @@ true "tag":"bob123", "makerCommission": 0.001, "takerCommission": 0.001, - "marginMakerCommission": -1, // if margin disabled, return -1 - "marginTakerCommission": -1, // if margin disabled, return -1 + "marginMakerCommission": -1, + "marginTakerCommission": -1, "createTime":1544433328000 }, { diff --git a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetBorrowHistory.txt b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetBorrowHistory.txt index acf948191..018bfdbd1 100644 --- a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetBorrowHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetBorrowHistory.txt @@ -12,7 +12,7 @@ true "collateralCoin": "BNB", "initialCollateralAmount": "49.27565492", "borrowTime": 1575018510000, - "status": "Repaid" // Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed + "status": "Repaid" } ], "total": 1 diff --git a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetCollateralRepayRate.txt b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetCollateralRepayRate.txt index c9ca64d36..eb7391824 100644 --- a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetCollateralRepayRate.txt +++ b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetCollateralRepayRate.txt @@ -5,5 +5,5 @@ true "loanlCoin": "BUSD", "collateralCoin": "BNB", "repayAmount": "1000", - "rate": "300.36781234" // rate of collateral coin/loan coin + "rate": "300.36781234" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetRepayHistory.txt b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetRepayHistory.txt index e667c67da..5cb2336d6 100644 --- a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetRepayHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/GetRepayHistory.txt @@ -9,8 +9,8 @@ true "collateralCoin": "BNB", "collateralUsed": "0", "collateralReturn": "49.27565492", - "repayType": "1", // 1 for "repay with borrowed coin", 2 for "repay with collateral" - "repayStatus": "Repaid", // Repaid, Repaying, Failed + "repayType": "1", + "repayStatus": "Repaid", "repayTime": 1575018510000, "orderId": 756783308056935434 } diff --git a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/Repay.txt b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/Repay.txt index 1e5e8f541..86dc8b29f 100644 --- a/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/Repay.txt +++ b/Binance.Net.UnitTests/Endpoints/General/CryptoLoans/Repay.txt @@ -8,5 +8,5 @@ true "collateralCoin": "BNB", "remainingCollateral": "5.253", "currentLTV": "0.25", - "repayStatus": "Repaid" // Repaid, Repaying + "repayStatus": "Repaid" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAPIKeyPermissions.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAPIKeyPermissions.txt index 25ee078f0..dba007823 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAPIKeyPermissions.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAPIKeyPermissions.txt @@ -4,13 +4,13 @@ true { "ipRestrict":false, "createTime":1698645219000, - "enableInternalTransfer":false, // This option authorizes this key to transfer funds between your master account and your sub account instantly - "enableFutures":false, // The Futures API cannot be used if the API key was created before the Futures account was opened, or if you have enabled portfolio margin. - "enablePortfolioMarginTrading":true, // API Key created before your activate portfolio margin does not support portfolio margin API service - "enableVanillaOptions":false, // Authorizes this key to Vanilla options trading - "permitsUniversalTransfer":false, // Authorizes this key to be used for a dedicated universal transfer API to transfer multiple supported currencies. Each business's own transfer API rights are not affected by this authorization + "enableInternalTransfer":false, + "enableFutures":false, + "enablePortfolioMarginTrading":true, + "enableVanillaOptions":false, + "permitsUniversalTransfer":false, "enableReading":true, - "enableSpotAndMarginTrading":false, // Spot and margin trading - "enableWithdrawals":false, // This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals - "enableMargin":false // This option can be adjusted after the Cross Margin account transfer is completed + "enableSpotAndMarginTrading":false, + "enableWithdrawals":false, + "enableMargin":false } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAccountVipLevelAndStatus.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAccountVipLevelAndStatus.txt new file mode 100644 index 000000000..96ba551b6 --- /dev/null +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAccountVipLevelAndStatus.txt @@ -0,0 +1,8 @@ +GET +/sapi/v1/account/info +true +{ + "vipLevel": 0, + "isMarginEnabled": true, + "isFutureEnabled": true +} \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAssetsForDustTransfer.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAssetsForDustTransfer.txt index 5ed9888d6..1a3559759 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAssetsForDustTransfer.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetAssetsForDustTransfer.txt @@ -6,14 +6,14 @@ true { "asset": "ADA", "assetFullName": "ADA", - "amountFree": "6.21", //Convertible amount - "toBTC": "0.00016848", //BTC amount - "toBNB": "0.01777302", //BNB amount - "toBNBOffExchange": "0.01741756", //BNB amount - "exchange": "0.00035546" //Commission fee + "amountFree": "6.21", + "toBTC": "0.00016848", + "toBNB": "0.01777302", + "toBNBOffExchange": "0.01741756", + "exchange": "0.00035546" } ], "totalTransferBtc": "0.00016848", "totalTransferBNB": "0.01777302", - "dribbletPercentage": "0.02" //Commission fee + "dribbletPercentage": "0.02" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetCommissionRates.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetCommissionRates.txt new file mode 100644 index 000000000..b03a951f2 --- /dev/null +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetCommissionRates.txt @@ -0,0 +1,24 @@ +GET +/api/v3/account/commission +true +{ + "symbol": "BTCUSDT", + "standardCommission": { + "maker": "0.00000010", + "taker": "0.00000020", + "buyer": "0.00000030", + "seller": "0.00000040" + }, + "taxCommission": { + "maker": "0.00000112", + "taker": "0.00000114", + "buyer": "0.00000118", + "seller": "0.00000116" + }, + "discount": { + "enabledForAccount": true, + "enabledForSymbol": true, + "discountAsset": "BNB", + "discount": "0.75000000" + } +} \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyFutureAccountSnapshot.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyFutureAccountSnapshot.txt index 90c7d4cad..ced1f1284 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyFutureAccountSnapshot.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyFutureAccountSnapshot.txt @@ -2,15 +2,15 @@ GET /sapi/v1/accountSnapshot true { - "code":200, // 200 for success; others are error codes - "msg":"", // error message + "code":200, + "msg":"", "snapshotVos":[ { "data":{ "assets":[ { "asset":"USDT", - "marginBalance":"118.99782335", // Not real-time data, can ignore + "marginBalance":"118.99782335", "walletBalance":"120.23811389" } ], @@ -20,7 +20,7 @@ true "markPrice":"7257.66239673", "positionAmt":"0.01000000", "symbol":"BTCUSDT", - "unRealizedProfit":"1.24029054" // Only show the value at the time of opening the position + "unRealizedProfit":"1.24029054" } ] }, diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyMarginAccountSnapshot.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyMarginAccountSnapshot.txt index b871e8c68..88e2bda6d 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyMarginAccountSnapshot.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailyMarginAccountSnapshot.txt @@ -2,8 +2,8 @@ GET /sapi/v1/accountSnapshot true { - "code":200, // 200 for success; others are error codes - "msg":"", // error message + "code":200, + "msg":"", "snapshotVos":[ { "data":{ diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailySpotAccountSnapshot.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailySpotAccountSnapshot.txt index 9a40b0771..39e69d107 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailySpotAccountSnapshot.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetDailySpotAccountSnapshot.txt @@ -2,8 +2,8 @@ GET /sapi/v1/accountSnapshot true { - "code":200, // 200 for success; others are error codes - "msg":"", // error message + "code":200, + "msg":"", "snapshotVos":[ { "data":{ diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatDepositWithdrawHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatDepositWithdrawHistory.txt index afc0c966b..4b4a9ad43 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatDepositWithdrawHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatDepositWithdrawHistory.txt @@ -10,9 +10,9 @@ true "fiatCurrency": "BRL", "indicatedAmount": "10.00", "amount": "10.00", - "totalFee": "0.00", // Trade fee - "method": "BankAccount", // Trade method - "status": "Expired", // Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped + "totalFee": "0.00", + "method": "BankAccount", + "status": "Expired", "createTime": 1626144956000, "updateTime": 1626400907000 } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatPaymentHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatPaymentHistory.txt index 943853e1a..8abc98ef0 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatPaymentHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFiatPaymentHistory.txt @@ -7,13 +7,13 @@ true "data": [ { "orderNo": "353fca443f06466db0c4dc89f94f027a", - "sourceAmount": "20.0", // Fiat trade amount - "fiatCurrency": "EUR", // Fiat token - "obtainAmount": "4.462", // Crypto trade amount - "cryptoCurrency": "LUNA", // Crypto token - "totalFee": "0.2", // Trade fee + "sourceAmount": "20.0", + "fiatCurrency": "EUR", + "obtainAmount": "4.462", + "cryptoCurrency": "LUNA", + "totalFee": "0.2", "price": "4.437472", - "status": "Failed", // Processing, Completed, Failed, Refunded + "status": "Failed", "paymentMethod": "Credit Card", "createTime": 1624529919000, "updateTime": 1624529919000 diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFundingWallet.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFundingWallet.txt index 5835bf732..0a4aea3cd 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFundingWallet.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetFundingWallet.txt @@ -4,9 +4,9 @@ true [ { "asset": "USDT", - "free": "1", // avalible balance - "locked": "0", // locked asset - "freeze": "0", // freeze asset + "free": "1", + "locked": "0", + "freeze": "0", "withdrawing": "0", "btcValuation": "0.00000091" } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetIsolatedMarginAccount.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetIsolatedMarginAccount.txt index 006a45966..0e709f1fe 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetIsolatedMarginAccount.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetIsolatedMarginAccount.txt @@ -32,9 +32,9 @@ true }, "symbol": "BTCUSDT", "isolatedCreated": true, - "enabled": true, // true-enabled, false-disabled + "enabled": true, "marginLevel": "0.00000000", - "marginLevelStatus": "EXCESSIVE", // "EXCESSIVE", "NORMAL", "MARGIN_CALL", "PRE_LIQUIDATION", "FORCE_LIQUIDATION" + "marginLevelStatus": "EXCESSIVE", "marginRatio": "0.00000000", "indexPrice": "10000.00000000", "liquidatePrice": "1000.00000000", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetLeveragedTokensUserLimit.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetLeveragedTokensUserLimit.txt index 8835f6a57..5f91345f2 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetLeveragedTokensUserLimit.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetLeveragedTokensUserLimit.txt @@ -4,12 +4,12 @@ true [ { "tokenName": "LINKUP", - "userDailyTotalPurchaseLimit": "1000", // USDT - "userDailyTotalRedeemLimit": "1000" // USDT + "userDailyTotalPurchaseLimit": "1000", + "userDailyTotalRedeemLimit": "1000" }, { "tokenName": "LINKDOWN", - "userDailyTotalPurchaseLimit": "1000", // USDT - "userDailyTotalRedeemLimit": "50000" // USDT + "userDailyTotalPurchaseLimit": "1000", + "userDailyTotalRedeemLimit": "50000" } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginAccountInfo.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginAccountInfo.txt index 9f4cdae2f..f84f98224 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginAccountInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginAccountInfo.txt @@ -4,14 +4,14 @@ true { "borrowEnabled": true, "marginLevel": "11.64405625", - "CollateralMarginLevel" : "3.2", + "collateralMarginLevel" : "3.2", "totalAssetOfBtc": "6.82728457", "totalLiabilityOfBtc": "0.58633215", "totalNetAssetOfBtc": "6.24095242", - "TotalCollateralValueInUSDT": "5.82728457", + "totalCollateralValueInUSDT": "5.82728457", "tradeEnabled": true, "transferEnabled": true, - "accountType": "Margin_1", // // Margin_1 for Cross Margin Classic, Margin_2 for Cross Margin Pro + "accountType": "Margin_1", "userAssets": [ { "asset": "BTC", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginInterestHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginInterestHistory.txt index 44db5bc13..e3744d6a8 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginInterestHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginInterestHistory.txt @@ -7,12 +7,12 @@ true "txId": 1352286576452864727, "interestAccuredTime": 1672160400000, "asset": "USDT", - "rawAsset": "USDT", // will not be returned for isolated margin + "rawAsset": "USDT", "principal": "45.3313", "interest": "0.00024995", "interestRate": "0.00013233", "type": "ON_BORROW", - "isolatedSymbol": "BNBUSDT" // isolated symbol, will not be returned for crossed margin + "isolatedSymbol": "BNBUSDT" } ], "total": 1 diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginLoans.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginLoans.txt index 54e415165..d8fde187e 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginLoans.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginLoans.txt @@ -4,12 +4,12 @@ true { "rows": [ { - "isolatedSymbol": "BNBUSDT", // isolated symbol, will not be returned for crossed margin - "amount": "14.00000000", // Total amount borrowed/repaid + "isolatedSymbol": "BNBUSDT", + "amount": "14.00000000", "asset": "BNB", - "interest": "0.01866667", // Interest repaid - "principal": "13.98133333", // Principal repaid - "status": "CONFIRMED", //one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account); + "interest": "0.01866667", + "principal": "13.98133333", + "status": "CONFIRMED", "timestamp": 1563438204000, "txId": 2970933056 } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginMaxBorrowAmount.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginMaxBorrowAmount.txt index 690f5e448..34abd415c 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginMaxBorrowAmount.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginMaxBorrowAmount.txt @@ -2,6 +2,6 @@ GET /sapi/v1/margin/maxBorrowable true { - "amount": "1.69248805", // account's currently max borrowable amount with sufficient system availability - "borrowLimit": "60" // max borrowable amount limited by the account level + "amount": "1.69248805", + "borrowLimit": "60" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginRepays.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginRepays.txt index 54e415165..3ae5d51f1 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginRepays.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginRepays.txt @@ -4,12 +4,12 @@ true { "rows": [ { - "isolatedSymbol": "BNBUSDT", // isolated symbol, will not be returned for crossed margin - "amount": "14.00000000", // Total amount borrowed/repaid + "isolatedSymbol": "BNBUSDT", + "amount": "14.00000000", "asset": "BNB", - "interest": "0.01866667", // Interest repaid - "principal": "13.98133333", // Principal repaid - "status": "CONFIRMED", //one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account); + "interest": "0.01866667", + "principal": "13.98133333", + "status": "CONFIRMED", "timestamp": 1563438204000, "txId": 2970933056 } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginTransferHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginTransferHistory.txt index 811170bd5..66874a568 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginTransferHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetMarginTransferHistory.txt @@ -10,8 +10,8 @@ true "timestamp": 1566898617, "txId": 5240372201, "type": "ROLL_IN", - "transFrom": "SPOT", //SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN - "transTo": "ISOLATED_MARGIN",//SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN + "transFrom": "SPOT", + "transTo": "ISOLATED_MARGIN" }, { "amount": "5.00000000", @@ -20,8 +20,8 @@ true "timestamp": 1566888436, "txId": 5239810406, "type": "ROLL_OUT", - "transFrom": "ISOLATED_MARGIN",//SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN - "transTo": "ISOLATED_MARGIN", //SPOT,FUTURES,FIAT,DELIVERY,MINING,ISOLATED_MARGIN,FUNDING,MOTHER_SPOT,OPTION,SUB_SPOT,SUB_MARGIN,CROSS_MARGIN + "transFrom": "ISOLATED_MARGIN", + "transTo": "ISOLATED_MARGIN", "fromSymbol": "BNBUSDT", "toSymbol": "BTCUSDT" }, diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginAccountInfo.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginAccountInfo.txt index 9ad456ab6..fc345f3f1 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginAccountInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginAccountInfo.txt @@ -2,10 +2,10 @@ GET /sapi/v1/portfolio/account true { - "uniMMR": "5167.92171923", // Classic Portfolio margin account maintenance margin rate + "uniMMR": "5167.92171923", "accountEquity": "122607.35137903", "actualEquity": "142607.35137903", "accountMaintMargin": "23.72469206", - "accountStatus": "NORMAL", // Classic Portfolio margin account status:"NORMAL", "MARGIN_CALL", "SUPPLY_MARGIN", "REDUCE_ONLY", "ACTIVE_LIQUIDATION", "FORCE_LIQUIDATION", "BANKRUPTED" - "accountType": "PM_1" //PM_1 for classic PM, PM_2 for PM + "accountStatus": "NORMAL", + "accountType": "PM_1" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginBankruptcyLoan.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginBankruptcyLoan.txt index 54779d020..92dd31683 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginBankruptcyLoan.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginBankruptcyLoan.txt @@ -3,5 +3,5 @@ GET true { "asset": "BUSD", - "amount": "579.45", // portfolio margin bankruptcy loan amount in BUSD + "amount": "579.45" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginCollateralRate.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginCollateralRate.txt index c5dd9f57e..812082ae9 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginCollateralRate.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetPortfolioMarginCollateralRate.txt @@ -9,5 +9,5 @@ false { "asset": "BUSD", "collateralRate": "1.0000" - }, + } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetRebateHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetRebateHistory.txt index ae0d45ada..4a194f54a 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetRebateHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetRebateHistory.txt @@ -6,12 +6,12 @@ true "type": "GENERAL", "code": "000000000", "data": { - "page": 1, // current page - "totalRecords": 2, // total records - "totalPageNum": 1, // total pages + "page": 1, + "totalRecords": 2, + "totalPageNum": 1, "data": [ { - "asset": "USDT", // rebate asset + "asset": "USDT", "type": 1, "amount": "0.0001126", "updateTime": 1637651320000 diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTradingStatus.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTradingStatus.txt index 60275a8f1..e6a9d5046 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTradingStatus.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTradingStatus.txt @@ -2,13 +2,13 @@ GET /sapi/v1/account/apiTradingStatus true { - "data": { // API trading status detail - "isLocked": false, // API trading function is locked or not - "plannedRecoverTime": 0, // If API trading function is locked, this is the planned recover time + "data": { + "isLocked": false, + "plannedRecoverTime": 0, "triggerCondition": { - "GCR": 150, // Number of GTC orders - "IFER": 150, // Number of FOK/IOC orders - "UFR": 300 // Number of orders + "GCR": 150, + "IFER": 150, + "UFR": 300 }, "updateTime": 1547630471725 } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTransfers.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTransfers.txt index 169721a7e..6061ef2fa 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTransfers.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetTransfers.txt @@ -8,7 +8,7 @@ true "asset":"USDT", "amount":"1", "type":"MAIN_UMFUTURE", - "status": "CONFIRMED", // status: CONFIRMED / FAILED / PENDING + "status": "CONFIRMED", "tranId": 11415955596, "timestamp":1544433328000 }, diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetUserAssets.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetUserAssets.txt index 067ad542b..f821598df 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetUserAssets.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetUserAssets.txt @@ -16,22 +16,22 @@ true { "addressRegex": "^(bnb1)[0-9a-z]{38}$", "coin": "BTC", - "depositDesc": "Wallet Maintenance, Deposit Suspended", // shown only when "depositEnable" is false. + "depositDesc": "Wallet Maintenance, Deposit Suspended", "depositEnable": false, "isDefault": false, "memoRegex": "^[0-9A-Za-z\\-_]{1,120}$", - "minConfirm": 1, // min number for balance confirmation + "minConfirm": 1, "name": "BEP2", "network": "BNB", "specialTips": "Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance.", - "unLockConfirm": 0, // confirmation number for balance unlock - "withdrawDesc": "Wallet Maintenance, Withdrawal Suspended", // shown only when "withdrawEnable" is false. + "unLockConfirm": 0, + "withdrawDesc": "Wallet Maintenance, Withdrawal Suspended", "withdrawEnable": false, "withdrawFee": "0.00000220", "withdrawIntegerMultiple": "0.00000001", "withdrawMax": "9999999999.99999999", "withdrawMin": "0.00000440", - "sameAddress": true, // If the coin needs to provide memo to withdraw + "sameAddress": true, "estimatedArrivalTime": 25, "busy": false }, diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalAddresses.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalAddresses.txt index 26b4c89ae..b634c519b 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalAddresses.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalAddresses.txt @@ -6,10 +6,10 @@ true "address": "string", "addressTag": "string", "coin": "string", - "name": "string", //is a user-defined name + "name": "string", "network": "string", - "origin": "string", //if originType=='others', the address source manually filled in by the user - "originType": "string", //Address source type - "whiteStatus": true //Is it whitelisted + "origin": "string", + "originType": "string", + "whiteStatus": true } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalHistory.txt index a1353d260..6bfbeead6 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalHistory.txt @@ -3,22 +3,22 @@ GET true [ { - "id": "b6ae22b3aa844210a7041aee7589627c", // Withdrawal id in Binance - "amount": "8.91000000", // withdrawal amount - "transactionFee": "0.004", // transaction fee + "id": "b6ae22b3aa844210a7041aee7589627c", + "amount": "8.91000000", + "transactionFee": "0.004", "coin": "USDT", "status": 6, "address": "0x94df8b352de7f46f64b01d3666bf6e936e44ce60", - "txId": "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268", // withdrawal transaction id - "applyTime": "2019-10-12 11:12:02", // UTC time + "txId": "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268", + "applyTime": "2019-10-12 11:12:02", "network": "ETH", - "transferType": 0, // 1 for internal transfer, 0 for external transfer - "withdrawOrderId": "WITHDRAWtest123", // // will not be returned if there's no withdrawOrderId for this withdraw. - "info": "The address is not valid. Please confirm with the recipient", // reason for withdrawal failure - "confirmNo":3, // confirm times for withdraw - "walletType": 1, //1: Funding Wallet 0:Spot Wallet + "transferType": 0, + "withdrawOrderId": "WITHDRAWtest123", + "info": "The address is not valid. Please confirm with the recipient", + "confirmNo":3, + "walletType": 1, "txKey": "", - "completeTime": "2023-03-23 16:52:41" // complete UTC time when user's asset is deduct from withdrawing, only if status = 6(success) + "completeTime": "2023-03-23 16:52:41" }, { "id": "156ec387f49b41df8724fa744fa82719", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginBorrow.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginBorrow.txt index 4f928a0c3..bb00cd2ac 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginBorrow.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginBorrow.txt @@ -2,6 +2,5 @@ POST /sapi/v1/margin/borrow-repay true { - //transaction id "tranId": 100000001 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginRepay.txt b/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginRepay.txt index 4f928a0c3..bb00cd2ac 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginRepay.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Account/MarginRepay.txt @@ -2,6 +2,5 @@ POST /sapi/v1/margin/borrow-repay true { - //transaction id "tranId": 100000001 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAggregatedTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAggregatedTradeHistory.txt index 36ab4718f..e0f68fc52 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAggregatedTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAggregatedTradeHistory.txt @@ -3,13 +3,13 @@ GET false [ { - "a": 26129, // Aggregate tradeId - "p": "0.01633102", // Price - "q": "4.70443515", // Quantity - "f": 27781, // First tradeId - "l": 27781, // Last tradeId - "T": 1498793709153, // Timestamp - "m": true, // Was the buyer the maker? - "M": true // Was the trade the best price match? + "a": 26129, + "p": "0.01633102", + "q": "4.70443515", + "f": 27781, + "l": 27781, + "T": 1498793709153, + "m": true, + "M": true } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAssetDetails.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAssetDetails.txt index e1282f11b..8411ca218 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAssetDetails.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAssetDetails.txt @@ -3,11 +3,11 @@ GET true { "CTR": { - "minWithdrawAmount": "70.00000000", //min withdraw amount - "depositStatus": false,//deposit status (false if ALL of networks' are false) - "withdrawFee": 35, // withdraw fee - "withdrawStatus": true, //withdraw status (false if ALL of networks' are false) - "depositTip": "Delisted, Deposit Suspended" //reason + "minWithdrawAmount": "70.00000000", + "depositStatus": false, + "withdrawFee": 35, + "withdrawStatus": true, + "depositTip": "Delisted, Deposit Suspended" }, "SKY": { "minWithdrawAmount": "0.02000000", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAvgPrice.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAvgPrice.txt index e91994c02..5e5f707da 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAvgPrice.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetAvgPrice.txt @@ -2,7 +2,7 @@ GET /api/v3/avgPrice false { - "mins": 5, // Average price interval (in minutes) - "price": "9.35751834", // Average price - "closeTime": 1694061154503 // Last trade time + "mins": 5, + "price": "9.35751834", + "closeTime": 1694061154503 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetExchangeInfo.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetExchangeInfo.txt index 3bbb646db..af95eab0b 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetExchangeInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetExchangeInfo.txt @@ -6,13 +6,9 @@ false "serverTime": 1565246363776, "rateLimits": [ { - //These are defined in the `ENUM definitions` section under `Rate Limiters (rateLimitType)`. - //All limits are optional } ], "exchangeFilters": [ - //These are the defined filters in the `Filters` section. - //All filters are optional. ], "symbols": [ { @@ -40,8 +36,6 @@ false "isSpotTradingAllowed": true, "isMarginTradingAllowed": true, "filters": [ - //These are defined in the Filters section. - //All filters are optional ], "permissions": [], "defaultSelfTradePreventionMode": "NONE", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetKlines.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetKlines.txt index 87ae4947d..10f313de5 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1499040000000, // Kline open time - "0.01634790", // Open price - "0.80000000", // High price - "0.01575800", // Low price - "0.01577100", // Close price - "148976.11427815", // Volume - 1499644799999, // Kline Close time - "2434.19055334", // Quote asset volume - 308, // Number of trades - "1756.87402397", // Taker buy base asset volume - "28.46694368", // Taker buy quote asset volume - "0" // Unused field, ignore. + 1499040000000, + "0.01634790", + "0.80000000", + "0.01575800", + "0.01577100", + "148976.11427815", + 1499644799999, + "2434.19055334", + 308, + "1756.87402397", + "28.46694368", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetRollingWindowTicker.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetRollingWindowTicker.txt index b14880f59..4a40e81db 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetRollingWindowTicker.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetRollingWindowTicker.txt @@ -3,18 +3,18 @@ GET false { "symbol": "BNBBTC", - "priceChange": "-8.00000000", // Absolute price change - "priceChangePercent": "-88.889", // Relative price change in percent - "weightedAvgPrice": "2.60427807", // QuoteVolume / Volume + "priceChange": "-8.00000000", + "priceChangePercent": "-88.889", + "weightedAvgPrice": "2.60427807", "openPrice": "9.00000000", "highPrice": "9.00000000", "lowPrice": "1.00000000", "lastPrice": "1.00000000", "volume": "187.00000000", - "quoteVolume": "487.00000000", // Sum of (price * volume) for all trades - "openTime": 1641859200000, // Open time for ticker window - "closeTime": 1642031999999, // Current Time of the Request - "firstId": 0, // Trade IDs + "quoteVolume": "487.00000000", + "openTime": 1641859200000, + "closeTime": 1642031999999, + "firstId": 0, "lastId": 60, - "count": 61 // Number of trades in the interval + "count": 61 } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTicker.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTicker.txt index 9210c1d70..43c146b7e 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTicker.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTicker.txt @@ -20,7 +20,7 @@ false "quoteVolume": "15.30000000", "openTime": 1499783499040, "closeTime": 1499869899040, - "firstId": 28385, // First tradeId - "lastId": 28460, // Last tradeId - "count": 76 // Trade count + "firstId": 28385, + "lastId": 28460, + "count": 76 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradeHistory.txt index 188144bbf..f6a4abfbe 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradeHistory.txt @@ -7,7 +7,7 @@ false "price": "4.00000100", "qty": "12.00000000", "quoteQty": "48.000012", - "time": 1499865549590, // Trade executed timestamp, as same as `T` in the stream + "time": 1499865549590, "isBuyerMaker": true, "isBestMatch": true } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradingDayTicker.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradingDayTicker.txt index af05d3073..5f847658b 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradingDayTicker.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetTradingDayTicker.txt @@ -3,18 +3,18 @@ GET false { "symbol": "BTCUSDT", - "priceChange": "-83.13000000", // Absolute price change - "priceChangePercent": "-0.317", // Relative price change in percent - "weightedAvgPrice": "26234.58803036", // quoteVolume / volume + "priceChange": "-83.13000000", + "priceChangePercent": "-0.317", + "weightedAvgPrice": "26234.58803036", "openPrice": "26304.80000000", "highPrice": "26397.46000000", "lowPrice": "26088.34000000", "lastPrice": "26221.67000000", - "volume": "18495.35066000", // Volume in base asset - "quoteVolume": "485217905.04210480", // Volume in quote asset + "volume": "18495.35066000", + "quoteVolume": "485217905.04210480", "openTime": 1695686400000, "closeTime": 1695772799999, - "firstId": 3220151555, // Trade ID of the first trade in the interval - "lastId": 3220849281, // Trade ID of the last trade in the interval - "count": 697727 // Number of trades in the interval + "firstId": 3220151555, + "lastId": 3220849281, + "count": 697727 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetUiKlines.txt b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetUiKlines.txt index 85d7856b4..1c4cd0014 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetUiKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/ExchangeData/GetUiKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1499040000000, // Kline open time - "0.01634790", // Open price - "0.80000000", // High price - "0.01575800", // Low price - "0.01577100", // Close price - "148976.11427815", // Volume - 1499644799999, // Kline close time - "2434.19055334", // Quote asset volume - 308, // Number of trades - "1756.87402397", // Taker buy base asset volume - "28.46694368", // Taker buy quote asset volume - "0" // Unused field. Ignore. + 1499040000000, + "0.01634790", + "0.80000000", + "0.01575800", + "0.01577100", + "148976.11427815", + 1499644799999, + "2434.19055334", + 308, + "1756.87402397", + "28.46694368", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelAllMarginOrders.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelAllMarginOrders.txt index 62dea534a..eb7c60e5f 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelAllMarginOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelAllMarginOrders.txt @@ -4,7 +4,7 @@ true [ { "symbol": "BTCUSDT", - "isIsolated": true, // if isolated margin + "isIsolated": true, "origClientOrderId": "E6APeyTJvkMvLMYMqu1KQ4", "orderId": 11, "orderListId": -1, @@ -21,7 +21,7 @@ true }, { "symbol": "BTCUSDT", - "isIsolated": false, // if isolated margin + "isIsolated": false, "origClientOrderId": "A3EF2HCwxgZPFMrfwbgrhv", "orderId": 13, "orderListId": -1, diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOcoOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOcoOrder.txt index 5757e21f9..859edba7a 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOcoOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOcoOrder.txt @@ -9,7 +9,7 @@ true "listClientOrderId": "C3wyj4WVEktd7u9aVBRXcN", "transactionTime": 1574040868128, "symbol": "LTCBTC", - "isIsolated": false, // if isolated margin + "isIsolated": false, "orders": [ { "symbol": "LTCBTC", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOrder.txt index f88ee0178..ab41196f3 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelMarginOrder.txt @@ -3,7 +3,7 @@ DELETE true { "symbol": "LTCBTC", - "isIsolated": true, // if isolated margin + "isIsolated": true, "orderId": "28", "origClientOrderId": "myOrder1", "clientOrderId": "cancelMyOrder1", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelOrder.txt index eb7453aa5..0f864c733 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/CancelOrder.txt @@ -5,7 +5,7 @@ true "symbol": "LTCBTC", "origClientOrderId": "myOrder1", "orderId": 4, - "orderListId": -1, //Unless part of an OCO, the value will always be -1. + "orderListId": -1, "clientOrderId": "cancelMyOrder1", "transactTime": 1684804350068, "price": "2.00000000", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/ConvertAcceptQuote.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/ConvertAcceptQuote.txt index 39689f54e..3dc8a332a 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/ConvertAcceptQuote.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/ConvertAcceptQuote.txt @@ -4,5 +4,5 @@ true { "orderId":"933256278426274426", "createTime":1623381330472, - "orderStatus":"PROCESS" //PROCESS/ACCEPT_SUCCESS/SUCCESS/FAIL + "orderStatus":"PROCESS" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetC2CTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetC2CTradeHistory.txt index 918f3f81c..c178b175b 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetC2CTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetC2CTradeHistory.txt @@ -12,12 +12,12 @@ true "asset": "BUSD", "fiat": "CNY", "fiatSymbol": "", - "amount": "5000.00000000", // Quantity (in Crypto) + "amount": "5000.00000000", "totalPrice": "33400.00000000", - "unitPrice": "6.68", // Unit Price (in Fiat) - "orderStatus": "COMPLETED", // PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM + "unitPrice": "6.68", + "orderStatus": "COMPLETED", "createTime": 1619361369000, - "commission": "0", // Transaction Fee (in Crypto) + "commission": "0", "counterPartNickName": "ab***", "advertisementRole": "TAKER" } diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetConvertTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetConvertTradeHistory.txt index 93619a71b..7ea1b3150 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetConvertTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetConvertTradeHistory.txt @@ -6,13 +6,13 @@ true { "quoteId": "f3b91c525b2644c7bc1e1cd31b6e1aa6", "orderId": 940708407462087195, - "orderStatus": "SUCCESS", // order status - "fromAsset": "USDT", // from asset - "fromAmount": "20", // from amount - "toAsset": "BNB", // to asset - "toAmount": "0.06154036", // to amount - "ratio": "0.00307702", // price ratio - "inverseRatio": "324.99", // inverse price + "orderStatus": "SUCCESS", + "fromAsset": "USDT", + "fromAmount": "20", + "toAsset": "BNB", + "toAmount": "0.06154036", + "ratio": "0.00307702", + "inverseRatio": "324.99", "createTime": 1624248872184 } ], diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensRedemptionRecords.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensRedemptionRecords.txt index 41d1eb9e7..404ea00f2 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensRedemptionRecords.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensRedemptionRecords.txt @@ -5,10 +5,10 @@ true { "id": 1, "tokenName": "LINKUP", - "amount": "0.54216292", // Redemption amount - "nav": "18.36345064", // NAV of redemption - "fee": "0.00995598", // Reemption fee - "netProceed": "9.94602604", // Net redemption value in usdt + "amount": "0.54216292", + "nav": "18.36345064", + "fee": "0.00995598", + "netProceed": "9.94602604", "timestamp":1599128003050 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensSubscriptionRecords.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensSubscriptionRecords.txt index 6cb0c2890..fd2c605b7 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensSubscriptionRecords.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetLeveragedTokensSubscriptionRecords.txt @@ -5,10 +5,10 @@ true { "id": 1, "tokenName": "LINKUP", - "amount": "0.54216292", // Subscription amount - "nav": "18.42621386", // NAV price of subscription - "fee": "0.00999000", // Subscription fee in usdt - "totalCharge": "9.99999991", // Subscription cost in usdt + "amount": "0.54216292", + "nav": "18.42621386", + "fee": "0.00999000", + "totalCharge": "9.99999991", "timestamp":1599127217916 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrder.txt index 6d70a881e..8a4aa4791 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrder.txt @@ -9,7 +9,7 @@ true "listClientOrderId": "h2USkA5YQpaXHPIrkd96xE", "transactionTime": 1565245656253, "symbol": "LTCBTC", - "isIsolated": false, // if isolated margin + "isIsolated": false, "orders": [ { "symbol": "LTCBTC", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrders.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrders.txt index 88dbdb809..3c9ca9e6d 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOcoOrders.txt @@ -10,7 +10,7 @@ true "listClientOrderId": "amEEAXryFzFwYF1FeRpUoZ", "transactionTime": 1565245913483, "symbol": "LTCBTC", - "isIsolated": true, // if isolated margin + "isIsolated": true, "orders": [ { "symbol": "LTCBTC", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOpenOcoOrders.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOpenOcoOrders.txt index 9849a8b8e..f1c9e398f 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOpenOcoOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetMarginOpenOcoOrders.txt @@ -10,7 +10,7 @@ true "listClientOrderId": "amEEAXryFzFwYF1FeRpUoZ", "transactionTime": 1565245913483, "symbol": "LTCBTC", - "isIsolated": true, // if isolated margin + "isIsolated": true, "orders": [ { "symbol": "LTCBTC", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOpenOrders.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOpenOrders.txt index 268e66b97..d57323ff4 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOpenOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOpenOrders.txt @@ -5,7 +5,7 @@ true { "symbol": "LTCBTC", "orderId": 1, - "orderListId": -1, //Unless OCO, the value will always be -1 + "orderListId": -1, "clientOrderId": "myOrder1", "price": "0.1", "origQty": "1.0", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrder.txt index 2462e82dd..67b32215b 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrder.txt @@ -4,7 +4,7 @@ true { "symbol": "LTCBTC", "orderId": 1, - "orderListId": -1, //Unless OCO, value will be -1 + "orderListId": -1, "clientOrderId": "myOrder1", "price": "0.1", "origQty": "1.0", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrders.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrders.txt index d7f1a8b5a..5af5f2725 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetOrders.txt @@ -5,7 +5,7 @@ true { "symbol": "LTCBTC", "orderId": 1, - "orderListId": -1, //Unless OCO, the value will always be -1 + "orderListId": -1, "clientOrderId": "myOrder1", "price": "0.1", "origQty": "1.0", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetUserTrades.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetUserTrades.txt index b5586a5bb..6d6d2a08a 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetUserTrades.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/GetUserTrades.txt @@ -6,7 +6,7 @@ true "symbol": "BNBBTC", "id": 28457, "orderId": 100234, - "orderListId": -1, //Unless OCO, the value will always be -1 + "orderListId": -1, "price": "4.00000100", "qty": "12.00000000", "quoteQty": "48.000012", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOCOOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOCOOrder.txt index dfd8ff57b..5d630ad97 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOCOOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOCOOrder.txt @@ -9,9 +9,9 @@ true "listClientOrderId": "JYVpp3F0f5CAG15DhtrqLp", "transactionTime": 1563417480525, "symbol": "LTCBTC", - "marginBuyBorrowAmount": "5", // will not return if no margin trade happens - "marginBuyBorrowAsset": "BTC", // will not return if no margin trade happens - "isIsolated": false, // if isolated margin + "marginBuyBorrowAmount": "5", + "marginBuyBorrowAsset": "BTC", + "isIsolated": false, "orders": [ { "symbol": "LTCBTC", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOrder.txt index fdaa2be4c..56a2a7dcf 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceMarginOrder.txt @@ -14,9 +14,9 @@ true "timeInForce": "GTC", "type": "MARKET", "side": "SELL", - "marginBuyBorrowAmount": 5, // will not return if no margin trade happens - "marginBuyBorrowAsset": "BTC", // will not return if no margin trade happens - "isIsolated": true, // if isolated margin + "marginBuyBorrowAmount": 5, + "marginBuyBorrowAsset": "BTC", + "isIsolated": true, "selfTradePreventionMode": "NONE", "fills": [ { diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceOrder.txt index ff9ddc6db..814289099 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceOrder.txt @@ -4,7 +4,7 @@ true { "symbol": "BTCUSDT", "orderId": 28, - "orderListId": -1, //Unless OCO, value will be -1 + "orderListId": -1, "clientOrderId": "6gCrw2kRUAF9CvJDGP16IP", "transactTime": 1507725176595, "price": "0.00000000", diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceTestOrder.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceTestOrder.txt index 782d6531e..62d7ab452 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceTestOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/PlaceTestOrder.txt @@ -2,18 +2,18 @@ POST /api/v3/order/test true { - "standardCommissionForOrder": { //Standard commission rates on trades from the order. + "standardCommissionForOrder": { "maker": "0.00000112", - "taker": "0.00000114", + "taker": "0.00000114" }, - "taxCommissionForOrder": { //Tax commission rates for trades from the order. + "taxCommissionForOrder": { "maker": "0.00000112", - "taker": "0.00000114", + "taker": "0.00000114" }, - "discount": { //Discount on standard commissions when paying in BNB. + "discount": { "enabledForAccount": true, "enabledForSymbol": true, "discountAsset": "BNB", - "discount": "0.25000000" //Standard commission is reduced by this rate when paying commission in BNB. + "discount": "0.25000000" } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/RedeemLeveragedToken.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/RedeemLeveragedToken.txt index a8539bb12..d0dce7ce0 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/RedeemLeveragedToken.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/RedeemLeveragedToken.txt @@ -3,9 +3,9 @@ POST true { "id": 123, - "status": "S", // S, P, and F for "success", "pending", and "failure" + "status": "S", "tokenName": "LINKUP", - "redeemAmount": "0.95590905", // Redemption token amount - "amount": "10.05022099", // Redemption value in usdt + "redeemAmount": "0.95590905", + "amount": "10.05022099", "timestamp":1600250279614 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/Spot/Trading/SubscribeLeveragedToken.txt b/Binance.Net.UnitTests/Endpoints/Spot/Trading/SubscribeLeveragedToken.txt index 06dc05b75..5f133b7d7 100644 --- a/Binance.Net.UnitTests/Endpoints/Spot/Trading/SubscribeLeveragedToken.txt +++ b/Binance.Net.UnitTests/Endpoints/Spot/Trading/SubscribeLeveragedToken.txt @@ -3,9 +3,9 @@ POST true { "id": 123, - "status": "S", // S, P, and F for "success", "pending", and "failure" + "status": "S", "tokenName": "LINKUP", - "amount": "0.95590905", // subscribed token amount - "cost": "9.99999995", // subscription cost in usdt + "amount": "0.95590905", + "cost": "9.99999995", "timestamp":1600249972899 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountConfiguration.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountConfiguration.txt new file mode 100644 index 000000000..cf45f33e2 --- /dev/null +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountConfiguration.txt @@ -0,0 +1,13 @@ +GET +/fapi/v1/accountConfig +true +{ + "feeTier": 0, + "canTrade": true, + "canDeposit": true, + "canWithdraw": true, + "dualSidePosition": true, + "updateTime": 0, + "multiAssetsMargin": false, + "tradeGroupId": -1 +} \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfo.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfo.txt index 5595c68e1..aba15e88a 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfo.txt @@ -2,77 +2,75 @@ GET /fapi/v2/account true { - "feeTier": 0, // account commission tier - "canTrade": true, // if can trade - "canDeposit": true, // if can transfer in asset - "canWithdraw": true, // if can transfer out asset - "updateTime": 0, // reserved property, please ignore + "feeTier": 0, + "canTrade": true, + "canDeposit": true, + "canWithdraw": true, + "updateTime": 0, "multiAssetsMargin": false, "tradeGroupId": -1, - "totalInitialMargin": "0.00000000", // total initial margin required with current mark price (useless with isolated positions), only for USDT asset - "totalMaintMargin": "0.00000000", // total maintenance margin required, only for USDT asset - "totalWalletBalance": "23.72469206", // total wallet balance, only for USDT asset - "totalUnrealizedProfit": "0.00000000", // total unrealized profit, only for USDT asset - "totalMarginBalance": "23.72469206", // total margin balance, only for USDT asset - "totalPositionInitialMargin": "0.00000000", // initial margin required for positions with current mark price, only for USDT asset - "totalOpenOrderInitialMargin": "0.00000000", // initial margin required for open orders with current mark price, only for USDT asset - "totalCrossWalletBalance": "23.72469206", // crossed wallet balance, only for USDT asset - "totalCrossUnPnl": "0.00000000", // unrealized profit of crossed positions, only for USDT asset - "availableBalance": "23.72469206", // available balance, only for USDT asset - "maxWithdrawAmount": "23.72469206", // maximum amount for transfer out, only for USDT asset + "totalInitialMargin": "0.00000000", + "totalMaintMargin": "0.00000000", + "totalWalletBalance": "23.72469206", + "totalUnrealizedProfit": "0.00000000", + "totalMarginBalance": "23.72469206", + "totalPositionInitialMargin": "0.00000000", + "totalOpenOrderInitialMargin": "0.00000000", + "totalCrossWalletBalance": "23.72469206", + "totalCrossUnPnl": "0.00000000", + "availableBalance": "23.72469206", + "maxWithdrawAmount": "23.72469206", "assets": [ { - "asset": "USDT", // asset name - "walletBalance": "23.72469206", // wallet balance - "unrealizedProfit": "0.00000000", // unrealized profit - "marginBalance": "23.72469206", // margin balance - "maintMargin": "0.00000000", // maintenance margin required - "initialMargin": "0.00000000", // total initial margin required with current mark price - "positionInitialMargin": "0.00000000", //initial margin required for positions with current mark price - "openOrderInitialMargin": "0.00000000", // initial margin required for open orders with current mark price - "crossWalletBalance": "23.72469206", // crossed wallet balance - "crossUnPnl": "0.00000000", // unrealized profit of crossed positions - "availableBalance": "23.72469206", // available balance - "maxWithdrawAmount": "23.72469206", // maximum amount for transfer out - "marginAvailable": true, // whether the asset can be used as margin in Multi-Assets mode - "updateTime": 1625474304765 // last update time + "asset": "USDT", + "walletBalance": "23.72469206", + "unrealizedProfit": "0.00000000", + "marginBalance": "23.72469206", + "maintMargin": "0.00000000", + "initialMargin": "0.00000000", + "positionInitialMargin": "0.00000000", + "openOrderInitialMargin": "0.00000000", + "crossWalletBalance": "23.72469206", + "crossUnPnl": "0.00000000", + "availableBalance": "23.72469206", + "maxWithdrawAmount": "23.72469206", + "marginAvailable": true, + "updateTime": 1625474304765 }, { - "asset": "BUSD", // asset name - "walletBalance": "103.12345678", // wallet balance - "unrealizedProfit": "0.00000000", // unrealized profit - "marginBalance": "103.12345678", // margin balance - "maintMargin": "0.00000000", // maintenance margin required - "initialMargin": "0.00000000", // total initial margin required with current mark price - "positionInitialMargin": "0.00000000", //initial margin required for positions with current mark price - "openOrderInitialMargin": "0.00000000", // initial margin required for open orders with current mark price - "crossWalletBalance": "103.12345678", // crossed wallet balance - "crossUnPnl": "0.00000000", // unrealized profit of crossed positions - "availableBalance": "103.12345678", // available balance - "maxWithdrawAmount": "103.12345678", // maximum amount for transfer out - "marginAvailable": true, // whether the asset can be used as margin in Multi-Assets mode - "updateTime": 1625474304765 // last update time + "asset": "BUSD", + "walletBalance": "103.12345678", + "unrealizedProfit": "0.00000000", + "marginBalance": "103.12345678", + "maintMargin": "0.00000000", + "initialMargin": "0.00000000", + "positionInitialMargin": "0.00000000", + "openOrderInitialMargin": "0.00000000", + "crossWalletBalance": "103.12345678", + "crossUnPnl": "0.00000000", + "availableBalance": "103.12345678", + "maxWithdrawAmount": "103.12345678", + "marginAvailable": true, + "updateTime": 1625474304765 } ], - "positions": [ // positions of all symbols in the market are returned - // only "BOTH" positions will be returned with One-way mode - // only "LONG" and "SHORT" positions will be returned with Hedge mode + "positions": [ { - "symbol": "BTCUSDT", // symbol name - "initialMargin": "0", // initial margin required with current mark price - "maintMargin": "0", // maintenance margin required - "unrealizedProfit": "0.00000000", // unrealized profit - "positionInitialMargin": "0", // initial margin required for positions with current mark price - "openOrderInitialMargin": "0", // initial margin required for open orders with current mark price - "leverage": "100", // current initial leverage - "isolated": true, // if the position is isolated - "entryPrice": "0.00000", // average entry price - "maxNotional": "250000", // maximum available notional with current leverage - "bidNotional": "0", // bids notional, ignore - "askNotional": "0", // ask notional, ignore - "positionSide": "BOTH", // position side - "positionAmt": "0", // position amount - "updateTime": 0 // last update time + "symbol": "BTCUSDT", + "initialMargin": "0", + "maintMargin": "0", + "unrealizedProfit": "0.00000000", + "positionInitialMargin": "0", + "openOrderInitialMargin": "0", + "leverage": "100", + "isolated": true, + "entryPrice": "0.00000", + "maxNotional": "250000", + "bidNotional": "0", + "askNotional": "0", + "positionSide": "BOTH", + "positionAmt": "0", + "updateTime": 0 } ] } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfoV3.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfoV3.txt new file mode 100644 index 000000000..49adb5ef9 --- /dev/null +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetAccountInfoV3.txt @@ -0,0 +1,62 @@ +GET +/fapi/v3/account +true +{ + "totalInitialMargin": "0.00000000", + "totalMaintMargin": "0.00000000", + "totalWalletBalance": "103.12345678", + "totalUnrealizedProfit": "0.00000000", + "totalMarginBalance": "103.12345678", + "totalPositionInitialMargin": "0.00000000", + "totalOpenOrderInitialMargin": "0.00000000", + "totalCrossWalletBalance": "103.12345678", + "totalCrossUnPnl": "0.00000000", + "availableBalance": "103.12345678", + "maxWithdrawAmount": "103.12345678", + "assets": [ + { + "asset": "USDT", + "walletBalance": "23.72469206", + "unrealizedProfit": "0.00000000", + "marginBalance": "23.72469206", + "maintMargin": "0.00000000", + "initialMargin": "0.00000000", + "positionInitialMargin": "0.00000000", + "openOrderInitialMargin": "0.00000000", + "crossWalletBalance": "23.72469206", + "crossUnPnl": "0.00000000", + "availableBalance": "23.72469206", + "maxWithdrawAmount": "23.72469206" , + "updateTime": 1625474304765 + }, + { + "asset": "USDC", + "walletBalance": "103.12345678", + "unrealizedProfit": "0.00000000", + "marginBalance": "103.12345678", + "maintMargin": "0.00000000", + "initialMargin": "0.00000000", + "positionInitialMargin": "0.00000000", + "openOrderInitialMargin": "0.00000000", + "crossWalletBalance": "103.12345678", + "crossUnPnl": "0.00000000", + "availableBalance": "126.72469206", + "maxWithdrawAmount": "103.12345678", + "updateTime": 1625474304765 + } + ], + "positions": [ + { + "symbol": "BTCUSDT", + "positionSide": "BOTH", + "positionAmt": "1.000", + "unrealizedProfit": "0.00000000", + "isolatedMargin": "0.00000000", + "notional": "0", + "isolatedWallet": "0", + "initialMargin": "0", + "maintMargin": "0", + "updateTime": 0 + } + ] +} \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBalances.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBalances.txt index dd461d376..963b88b07 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBalances.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBalances.txt @@ -1,16 +1,16 @@ GET -/fapi/v2/balance +/fapi/v3/balance true [ { - "accountAlias": "SgsR", // unique account code - "asset": "USDT", // asset name - "balance": "122607.35137903", // wallet balance - "crossWalletBalance": "23.72469206", // crossed wallet balance - "crossUnPnl": "0.00000000", // unrealized profit of crossed positions - "availableBalance": "23.72469206", // available balance - "maxWithdrawAmount": "23.72469206", // maximum amount for transfer out - "marginAvailable": true, // whether the asset can be used as margin in Multi-Assets mode + "accountAlias": "SgsR", + "asset": "USDT", + "balance": "122607.35137903", + "crossWalletBalance": "23.72469206", + "crossUnPnl": "0.00000000", + "availableBalance": "23.72469206", + "maxWithdrawAmount": "23.72469206", + "marginAvailable": true, "updateTime": 1617939110373 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBnbBurnStatus.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBnbBurnStatus.txt index a16b3df2a..dbdfc087d 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBnbBurnStatus.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBnbBurnStatus.txt @@ -2,5 +2,5 @@ GET /fapi/v1/feeBurn true { - "feeBurn": true // "true": Fee Discount On; "false": Fee Discount Off + "feeBurn": true } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBrackets.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBrackets.txt index a447c6151..c8adcbbce 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBrackets.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetBrackets.txt @@ -4,17 +4,17 @@ true [ { "symbol": "ETHUSDT", - "notionalCoef": 1.50, //user symbol bracket multiplier, only appears when user's symbol bracket is adjusted + "notionalCoef": 1.50, "brackets": [ { - "bracket": 1, // Notional bracket - "initialLeverage": 75, // Max initial leverage for this bracket - "notionalCap": 10000, // Cap notional of this bracket - "notionalFloor": 0, // Notional threshold of this bracket - "maintMarginRatio": 0.0065, // Maintenance ratio for this bracket - "cum":0 // Auxiliary number for quick calculation + "bracket": 1, + "initialLeverage": 75, + "notionalCap": 10000, + "notionalFloor": 0, + "maintMarginRatio": 0.0065, + "cum":0 - }, + } ] } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForOrderHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForOrderHistory.txt index c8a6a75fc..c178590c3 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForOrderHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForOrderHistory.txt @@ -2,6 +2,6 @@ GET /fapi/v1/order/asyn true { - "avgCostTimestampOfLast30d":7241837, // Average time taken for data download in the past 30 days - "downloadId":"546975389218332672", + "avgCostTimestampOfLast30d":7241837, + "downloadId":"546975389218332672" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTradeHistory.txt index 7e27af322..50395747b 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTradeHistory.txt @@ -2,6 +2,6 @@ GET /fapi/v1/trade/asyn true { - "avgCostTimestampOfLast30d":7241837, // Average time taken for data download in the past 30 days - "downloadId":"546975389218332672", + "avgCostTimestampOfLast30d":7241837, + "downloadId":"546975389218332672" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTransactionHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTransactionHistory.txt index 9fe7aad22..21662ec22 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTransactionHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadIdForTransactionHistory.txt @@ -2,6 +2,6 @@ GET /fapi/v1/income/asyn true { - "avgCostTimestampOfLast30d":7241837, // Average time taken for data download in the past 30 days - "downloadId":"546975389218332672", + "avgCostTimestampOfLast30d":7241837, + "downloadId":"546975389218332672" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForOrderHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForOrderHistory.txt index 2c84cfe88..28958f160 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForOrderHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForOrderHistory.txt @@ -4,8 +4,8 @@ true { "downloadId":"545923594199212032", "status":"completed", - "url":"www.binance.com", // The link is mapped to download id - "notified":true, // ignore - "expirationTimestamp":1645009771000, // The link would expire after this timestamp - "isExpired":null, + "url":"www.binance.com", + "notified":true, + "expirationTimestamp":1645009771000, + "isExpired":null } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTradeHistory.txt index 9ca76289e..059b8ba99 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTradeHistory.txt @@ -4,8 +4,8 @@ true { "downloadId":"545923594199212032", "status":"completed", - "url":"www.binance.com", // The link is mapped to download id - "notified":true, // ignore - "expirationTimestamp":1645009771000, // The link would expire after this timestamp - "isExpired":null, + "url":"www.binance.com", + "notified":true, + "expirationTimestamp":1645009771000, + "isExpired":null } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTransactionHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTransactionHistory.txt index e3212f723..e0049d420 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTransactionHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetDownloadLinkForTransactionHistory.txt @@ -4,8 +4,8 @@ true { "downloadId":"545923594199212032", "status":"completed", - "url":"www.binance.com", // The link is mapped to download id - "notified":true, // ignore - "expirationTimestamp":1645009771000, // The link would expire after this timestamp - "isExpired":null, + "url":"www.binance.com", + "notified":true, + "expirationTimestamp":1645009771000, + "isExpired":null } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetIncomeHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetIncomeHistory.txt index 41094c5b7..3d0a43d72 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetIncomeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetIncomeHistory.txt @@ -3,14 +3,14 @@ GET true [ { - "symbol": "", // trade symbol, if existing - "incomeType": "TRANSFER", // income type - "income": "-0.37500000", // income amount - "asset": "USDT", // income asset - "info":"TRANSFER", // extra information + "symbol": "", + "incomeType": "TRANSFER", + "income": "-0.37500000", + "asset": "USDT", + "info":"TRANSFER", "time": 1570608000000, - "tranId":"9689322392", // transaction id - "tradeId":"" // trade id, if existing + "tranId":"9689322392", + "tradeId":"" }, { "symbol": "BTCUSDT", diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetMultiAssetsMode.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetMultiAssetsMode.txt index f99c8ee03..3001ff86e 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetMultiAssetsMode.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetMultiAssetsMode.txt @@ -2,5 +2,5 @@ GET /fapi/v1/multiAssetsMargin true { - "multiAssetsMargin": true // "true": Multi-Assets Mode; "false": Single-Asset Mode + "multiAssetsMargin": true } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetOrderRateLimit.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetOrderRateLimit.txt index 4f23b608a..12462fb56 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetOrderRateLimit.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetOrderRateLimit.txt @@ -6,12 +6,12 @@ true "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, - "limit": 10000, + "limit": 10000 }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, - "limit": 20000, + "limit": 20000 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetPositionAdlQuantileEstimation.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetPositionAdlQuantileEstimation.txt index dcb8eb552..0b5bfba6b 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetPositionAdlQuantileEstimation.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetPositionAdlQuantileEstimation.txt @@ -6,20 +6,18 @@ true "symbol": "ETHUSDT", "adlQuantile": { - // if the positions of the symbol are crossed margined in Hedge Mode, "LONG" and "SHORT" will be returned a same quantile value, and "HEDGE" will be returned instead of "BOTH". "LONG": 3, "SHORT": 3, - "HEDGE": 0 // only a sign, ignore the value + "HEDGE": 0 } }, { "symbol": "BTCUSDT", "adlQuantile": { - // for positions of the symbol are in One-way Mode or isolated margined in Hedge Mode - "LONG": 1, // adl quantile for "LONG" position in hedge mode - "SHORT": 2, // adl qauntile for "SHORT" position in hedge mode - "BOTH": 0 // adl qunatile for position in one-way mode + "LONG": 1, + "SHORT": 2, + "BOTH": 0 } } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetSymbolConfiguration.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetSymbolConfiguration.txt new file mode 100644 index 000000000..0501d40f8 --- /dev/null +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetSymbolConfiguration.txt @@ -0,0 +1,12 @@ +GET +/fapi/v1/symbolConfig +true +[ + { + "symbol": "BTCUSDT", + "marginType": "CROSSED", + "isAutoAddMargin": "false", + "leverage": 21, + "maxNotionalValue": "1000000" + } +] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetTradingStatus.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetTradingStatus.txt index accea9679..b1b20051b 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetTradingStatus.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetTradingStatus.txt @@ -2,35 +2,35 @@ GET /fapi/v1/apiTradingStatus true { - "indicators": { // indicator: quantitative rules indicators, value: user's indicators value, triggerValue: trigger indicator value threshold of quantitative rules. + "indicators": { "BTCUSDT": [ { "isLocked": true, "plannedRecoverTime": 1545741270000, - "indicator": "UFR", // Unfilled Ratio (UFR) - "value": 0.05, // Current value - "triggerValue": 0.995 // Trigger value + "indicator": "UFR", + "value": 0.05, + "triggerValue": 0.995 }, { "isLocked": true, "plannedRecoverTime": 1545741270000, - "indicator": "IFER", // IOC/FOK Expiration Ratio (IFER) - "value": 0.99, // Current value - "triggerValue": 0.99 // Trigger value + "indicator": "IFER", + "value": 0.99, + "triggerValue": 0.99 }, { "isLocked": true, "plannedRecoverTime": 1545741270000, - "indicator": "GCR", // GTC Cancellation Ratio (GCR) - "value": 0.99, // Current value - "triggerValue": 0.99 // Trigger value + "indicator": "GCR", + "value": 0.99, + "triggerValue": 0.99 }, { "isLocked": true, "plannedRecoverTime": 1545741270000, - "indicator": "DR", // Dust Ratio (DR) - "value": 0.99, // Current value - "triggerValue": 0.99 // Trigger value + "indicator": "DR", + "value": 0.99, + "triggerValue": 0.99 } ], "ETHUSDT": [ diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetUserCommissionRate.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetUserCommissionRate.txt index 2d5437c3d..4f8bd9108 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetUserCommissionRate.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Account/GetUserCommissionRate.txt @@ -3,6 +3,6 @@ GET true { "symbol": "BTCUSDT", - "makerCommissionRate": "0.0002", // 0.02% - "takerCommissionRate": "0.0004" // 0.04% + "makerCommissionRate": "0.0002", + "takerCommissionRate": "0.0004" } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetAggregatedTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetAggregatedTradeHistory.txt index 6860b5f94..7698a80d6 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetAggregatedTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetAggregatedTradeHistory.txt @@ -3,12 +3,12 @@ GET false [ { - "a": 26129, // Aggregate tradeId - "p": "0.01633102", // Price - "q": "4.70443515", // Quantity - "f": 27781, // First tradeId - "l": 27781, // Last tradeId - "T": 1498793709153, // Timestamp - "m": true, // Was the buyer the maker? + "a": 26129, + "p": "0.01633102", + "q": "4.70443515", + "f": 27781, + "l": 27781, + "T": 1498793709153, + "m": true } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetBookPrice.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetBookPrice.txt index d62a8a9e1..0426a912d 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetBookPrice.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetBookPrice.txt @@ -8,5 +8,5 @@ false "bidQty": "431.00000000", "askPrice": "4.00000200", "askQty": "9.00000000", - "time": 1589437530011 // Transaction time + "time": 1589437530011 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetCompositeIndexInfo.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetCompositeIndexInfo.txt index 0860fe898..4fe6a8e89 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetCompositeIndexInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetCompositeIndexInfo.txt @@ -4,8 +4,8 @@ false [ { "symbol": "DEFIUSDT", - "time": 1589437530011, // Current time - "component": "baseAsset", //Component asset + "time": 1589437530011, + "component": "baseAsset", "baseAssetList":[ { "baseAsset":"BAL", diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetContinuousContractKlines.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetContinuousContractKlines.txt index 08f400d62..6bb6f867e 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetContinuousContractKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetContinuousContractKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1607444700000, // Open time - "18879.99", // Open - "18900.00", // High - "18878.98", // Low - "18896.13", // Close (or latest price) - "492.363", // Volume - 1607444759999, // Close time - "9302145.66080", // Quote asset volume - 1874, // Number of trades - "385.983", // Taker buy volume - "7292402.33267", // Taker buy quote asset volume - "0" // Ignore. + 1607444700000, + "18879.99", + "18900.00", + "18878.98", + "18896.13", + "492.363", + 1607444759999, + "9302145.66080", + 1874, + "385.983", + "7292402.33267", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetExchangeInfo.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetExchangeInfo.txt index d2a81e717..83b27918f 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetExchangeInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetExchangeInfo.txt @@ -17,12 +17,12 @@ false "rateLimitType": "ORDERS" } ], - "serverTime": 1565613908500, // Ignore please. If you want to check current server time, please check via "GET /fapi/v1/time" - "assets": [ // assets information + "serverTime": 1565613908500, + "assets": [ { "asset": "BUSD", - "marginAvailable": true, // whether the asset can be used as margin in Multi-Assets mode - "autoAssetExchange": 0 // auto-exchange threshold in Multi-Assets margin mode + "marginAvailable": true, + "autoAssetExchange": 0 }, { "asset": "USDT", @@ -43,19 +43,19 @@ false "deliveryDate": 4133404800000, "onboardDate": 1598252400000, "status": "TRADING", - "maintMarginPercent": "2.5000", // ignore - "requiredMarginPercent": "5.0000", // ignore + "maintMarginPercent": "2.5000", + "requiredMarginPercent": "5.0000", "baseAsset": "BLZ", "quoteAsset": "USDT", "marginAsset": "USDT", - "pricePrecision": 5, // please do not use it as tickSize - "quantityPrecision": 0, // please do not use it as stepSize + "pricePrecision": 5, + "quantityPrecision": 0, "baseAssetPrecision": 8, "quotePrecision": 8, "underlyingType": "COIN", "underlyingSubType": ["STORAGE"], "settlePlan": 0, - "triggerProtect": "0.15", // threshold for algo order with "priceProtect" + "triggerProtect": "0.15", "filters": [ { "filterType": "PRICE_FILTER", @@ -85,7 +85,7 @@ false }, { "filterType": "MIN_NOTIONAL", - "notional": "5.0", + "notional": "5.0" }, { "filterType": "PERCENT_PRICE", @@ -109,8 +109,8 @@ false "FOK", "GTX" ], - "liquidationFee": "0.010000", // liquidation fee rate - "marketTakeBound": "0.30", // the max price difference rate( from mark price) a market order can make + "liquidationFee": "0.010000", + "marketTakeBound": "0.30" } ], "timezone": "UTC" diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingInfo.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingInfo.txt index c0556f028..ae41aada8 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingInfo.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingInfo.txt @@ -7,6 +7,6 @@ false "adjustedFundingRateCap": "0.02500000", "adjustedFundingRateFloor": "-0.02500000", "fundingIntervalHours": 8, - "disclaimer": false // ingore + "disclaimer": false } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingRates.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingRates.txt index 3f7786967..9ae533f6f 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingRates.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetFundingRates.txt @@ -6,7 +6,7 @@ false "symbol": "BTCUSDT", "fundingTime": 1698768000000, "fundingRate": "0.00010000", - "markPrice": "34287.54619963" // mark price associated with a particular funding fee charge + "markPrice": "34287.54619963" }, { "symbol": "BTCUSDT", diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt index 93de25950..2fa089961 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetGlobalLongShortAccountRatio.txt @@ -3,9 +3,9 @@ GET false [ { - "symbol":"BTCUSDT", // long/short account num ratio of all traders - "longShortRatio":"0.1960", //long account num ratio of all traders - "longAccount": "0.6622", // short account num ratio of all traders + "symbol":"BTCUSDT", + "longShortRatio":"0.1960", + "longAccount": "0.6622", "shortAccount":"0.3378", "timestamp":"1583139600000" }, @@ -15,5 +15,5 @@ false "longAccount": "0.6617", "shortAccount":"0.3382", "timestamp":"1583139900000" - }, + } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetIndexPriceKlines.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetIndexPriceKlines.txt index a9c332be9..b217205cd 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetIndexPriceKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetIndexPriceKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1591256400000, // Open time - "9653.69440000", // Open - "9653.69640000", // High - "9651.38600000", // Low - "9651.55200000", // Close (or latest price) - "0 ", // Ignore - 1591256459999, // Close time - "0", // Ignore - 60, // Ignore - "0", // Ignore - "0", // Ignore - "0" // Ignore + 1591256400000, + "9653.69440000", + "9653.69640000", + "9651.38600000", + "9651.55200000", + "0 ", + 1591256459999, + "0", + 60, + "0", + "0", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetKlines.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetKlines.txt index 04a4b808e..440b47ff2 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1499040000000, // Open time - "0.01634790", // Open - "0.80000000", // High - "0.01575800", // Low - "0.01577100", // Close - "148976.11427815", // Volume - 1499644799999, // Close time - "2434.19055334", // Quote asset volume - 308, // Number of trades - "1756.87402397", // Taker buy base asset volume - "28.46694368", // Taker buy quote asset volume - "17928899.62484339" // Ignore. + 1499040000000, + "0.01634790", + "0.80000000", + "0.01575800", + "0.01577100", + "148976.11427815", + 1499644799999, + "2434.19055334", + 308, + "1756.87402397", + "28.46694368", + "17928899.62484339" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPrice.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPrice.txt index 87dda0777..52315a2e8 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPrice.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPrice.txt @@ -3,10 +3,10 @@ GET false { "symbol": "BTCUSDT", - "markPrice": "11793.63104562", // mark price - "indexPrice": "11781.80495970", // index price - "estimatedSettlePrice": "11781.16138815", // Estimated Settle Price, only useful in the last hour before the settlement starts. - "lastFundingRate": "0.00038246", // This is the Latest funding rate + "markPrice": "11793.63104562", + "indexPrice": "11781.80495970", + "estimatedSettlePrice": "11781.16138815", + "lastFundingRate": "0.00038246", "nextFundingTime": 1597392000000, "interestRate": "0.00010000", "time": 1597370495002 diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPriceKlines.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPriceKlines.txt index e48fbc048..08c55aa0d 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPriceKlines.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetMarkPriceKlines.txt @@ -3,17 +3,17 @@ GET false [ [ - 1591256460000, // Open time - "9653.29201333", // Open - "9654.56401333", // High - "9653.07367333", // Low - "9653.07367333", // Close (or latest price) - "0 ", // Ignore - 1591256519999, // Close time - "0", // Ignore - 60, // Ignore - "0", // Ignore - "0", // Ignore - "0" // Ignore + 1591256460000, + "9653.29201333", + "9654.56401333", + "9653.07367333", + "9653.07367333", + "0 ", + 1591256519999, + "0", + 60, + "0", + "0", + "0" ] ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterest.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterest.txt index da41231d5..12f2c4116 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterest.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterest.txt @@ -4,5 +4,5 @@ false { "openInterest": "10659.509", "symbol": "BTCUSDT", - "time": 1589437530011 // Transaction time + "time": 1589437530011 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterestHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterestHistory.txt index ca06e44a5..ef9c3b09a 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterestHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOpenInterestHistory.txt @@ -4,8 +4,8 @@ false [ { "symbol":"BTCUSDT", - "sumOpenInterest":"20403.63700000", // total open interest - "sumOpenInterestValue": "150570784.07809979", // total open interest value + "sumOpenInterest":"20403.63700000", + "sumOpenInterestValue": "150570784.07809979", "timestamp":"1583127900000" }, { @@ -13,5 +13,5 @@ false "sumOpenInterest":"20401.36700000", "sumOpenInterestValue":"149940752.14464448", "timestamp":"1583128200000" - }, + } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOrderBook.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOrderBook.txt index 37b42db46..8a03e9a1e 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOrderBook.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetOrderBook.txt @@ -3,12 +3,12 @@ GET false { "lastUpdateId": 1027024, - "E": 1589436922972, // Message output time - "T": 1589436922959, // Transaction time + "E": 1589436922972, + "T": 1589436922959, "bids": [ [ - "4.00000000", // PRICE - "431.00000000" // QTY + "4.00000000", + "431.00000000" ] ], "asks": [ diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetPrice.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetPrice.txt index bdc904dec..3b3268ae1 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetPrice.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetPrice.txt @@ -4,5 +4,5 @@ false { "symbol": "BTCUSDT", "price": "6000.01", - "time": 1589437530011 // Transaction time + "time": 1589437530011 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetRecentTrades.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetRecentTrades.txt index 8d5e872aa..52d49bd04 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetRecentTrades.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetRecentTrades.txt @@ -8,6 +8,6 @@ false "qty": "12.00000000", "quoteQty": "48.00", "time": 1499865549590, - "isBuyerMaker": true, + "isBuyerMaker": true } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt index b8ff0b9a3..02d4ac5b0 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTakerBuySellVolumeRatio.txt @@ -13,5 +13,5 @@ false "buyVol": "343.9290", "sellVol":"248.5030", "timestamp":"1583139900000" - }, + } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTicker.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTicker.txt index f3131bd62..febab0ff0 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTicker.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTicker.txt @@ -15,7 +15,7 @@ false "quoteVolume": "15.30000000", "openTime": 1499783499040, "closeTime": 1499869899040, - "firstId": 28385, // First tradeId - "lastId": 28460, // Last tradeId - "count": 76 // Trade count + "firstId": 28385, + "lastId": 28460, + "count": 76 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortAccountRatio.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortAccountRatio.txt index 41744ffd0..9ea8deb83 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortAccountRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortAccountRatio.txt @@ -4,9 +4,9 @@ false [ { "symbol":"BTCUSDT", - "longShortRatio":"1.8105", // long/short account num ratio of top traders - "longAccount": "0.6442", // long account num ratio of top traders - "shortAccount":"0.3558", // long account num ratio of top traders + "longShortRatio":"1.8105", + "longAccount": "0.6442", + "shortAccount":"0.3558", "timestamp":"1583139600000" }, { @@ -15,5 +15,5 @@ false "longAccount": "0.3580", "shortAccount":"0.6420", "timestamp":"1583139900000" - }, + } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortPositionRatio.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortPositionRatio.txt index 382ac0474..fab2f0200 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortPositionRatio.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTopLongShortPositionRatio.txt @@ -4,9 +4,9 @@ false [ { "symbol":"BTCUSDT", - "longShortRatio":"1.4342",// long/short position ratio of top traders - "longAccount": "0.5891", // long positions ratio of top traders - "shortAccount":"0.4656", // short positions ratio of top traders + "longShortRatio":"1.4342", + "longAccount": "0.5891", + "shortAccount":"0.4656", "timestamp":"1583139600000" }, { @@ -15,5 +15,5 @@ false "longAccount": "0.3583", "shortAccount":"0.6417", "timestamp":"1583139900000" - }, + } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTradeHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTradeHistory.txt index 5fc7874f9..26c336f1e 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTradeHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/ExchangeData/GetTradeHistory.txt @@ -8,6 +8,6 @@ false "qty": "12.00000000", "quoteQty": "8000.00", "time": 1499865549590, - "isBuyerMaker": true, + "isBuyerMaker": true } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelMultipleOrders.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelMultipleOrders.txt index 74f2b2fed..fd53cb670 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelMultipleOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelMultipleOrders.txt @@ -15,19 +15,19 @@ true "side": "BUY", "positionSide": "SHORT", "status": "CANCELED", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSDT", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1571110484038, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0 }, { "code": -2011, diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelOrder.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelOrder.txt index a950ee948..c83e13c52 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/CancelOrder.txt @@ -14,17 +14,17 @@ true "side": "BUY", "positionSide": "SHORT", "status": "CANCELED", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSDT", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1571110484038, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/EditOrder.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/EditOrder.txt index a81262603..a11cc64d8 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/EditOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/EditOrder.txt @@ -23,8 +23,8 @@ true "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0, //order pre-set auot cancel time for TIF GTD order + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0, "updateTime": 1629182711600 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrder.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrder.txt index 76453ae4e..aeb2b5d2d 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrder.txt @@ -14,18 +14,18 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSDT", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrders.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrders.txt index d6f2b9d11..2db71543e 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOpenOrders.txt @@ -15,19 +15,19 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSDT", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time + "activatePrice": "9020", + "priceRate": "0.3", + "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrder.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrder.txt index 7613cd742..322356ad7 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrder.txt @@ -14,18 +14,18 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSDT", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time + "activatePrice": "9020", + "priceRate": "0.3", + "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrderEditHistory.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrderEditHistory.txt index 18c3477de..b26cd829a 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrderEditHistory.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrderEditHistory.txt @@ -3,12 +3,12 @@ GET true [ { - "amendmentId": 5363, // Order modification ID + "amendmentId": 5363, "symbol": "BTCUSDT", "pair": "BTCUSDT", "orderId": 20072994037, "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", - "time": 1629184560899, // Order modification time + "time": 1629184560899, "amendment": { "price": { "before": "30004", @@ -18,7 +18,7 @@ true "before": "1", "after": "1" }, - "count": 3 // Order modification count, representing the number of times the order has been modified + "count": 3 }, "priceMatch":"QUEUE_20" }, diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrders.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrders.txt index 7388fd3e5..c17e639a3 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetOrders.txt @@ -15,19 +15,19 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSDT", - "time": 1579276756075, // order time + "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time + "activatePrice": "9020", + "priceRate": "0.3", + "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0 } ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetPositions.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetPositions.txt new file mode 100644 index 000000000..10ae082ad --- /dev/null +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/GetPositions.txt @@ -0,0 +1,49 @@ +GET +/fapi/v3/positionRisk +true +[ + { + "symbol": "ADAUSDT", + "positionSide": "LONG", + "positionAmt": "30", + "entryPrice": "0.385", + "breakEvenPrice": "0.385077", + "markPrice": "0.41047590", + "unRealizedProfit": "0.76427700", + "liquidationPrice": "0", + "isolatedMargin": "0", + "notional": "12.31427700", + "marginAsset": "USDT", + "isolatedWallet": "0", + "initialMargin": "0.61571385", + "maintMargin": "0.08004280", + "positionInitialMargin": "0.61571385", + "openOrderInitialMargin": "0", + "adl": 2, + "bidNotional": "0", + "askNotional": "0", + "updateTime": 1720736417660 + }, + { + "symbol": "COMPUSDT", + "positionSide": "SHORT", + "positionAmt": "-1.000", + "entryPrice": "70.92841", + "breakEvenPrice": "70.900038636", + "markPrice": "49.72023376", + "unRealizedProfit": "21.20817624", + "liquidationPrice": "2260.56757210", + "isolatedMargin": "0", + "notional": "-49.72023376", + "marginAsset": "USDT", + "isolatedWallet": "0", + "initialMargin": "2.48601168", + "maintMargin": "0.49720233", + "positionInitialMargin": "2.48601168", + "openOrderInitialMargin": "0", + "adl": 2, + "bidNotional": "0", + "askNotional": "0", + "updateTime": 1708943511656 + } +] \ No newline at end of file diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceMultipleOrders.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceMultipleOrders.txt index 8a91d1878..9dcc64c34 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceMultipleOrders.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceMultipleOrders.txt @@ -15,19 +15,19 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET + "stopPrice": "9300", "symbol": "BTCUSDT", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "origType": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1566818724722, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 0 }, { "code": -2022, diff --git a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceOrder.txt b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceOrder.txt index 63d98e642..b9505dd44 100644 --- a/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceOrder.txt +++ b/Binance.Net.UnitTests/Endpoints/UsdFutures/Trading/PlaceOrder.txt @@ -14,18 +14,18 @@ true "side": "BUY", "positionSide": "SHORT", "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All + "stopPrice": "9300", + "closePosition": false, "symbol": "BTCUSDT", "timeInForce": "GTD", "type": "TRAILING_STOP_MARKET", "origType": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order + "activatePrice": "9020", + "priceRate": "0.3", "updateTime": 1566818724722, "workingType": "CONTRACT_PRICE", - "priceProtect": false, // if conditional order trigger is protected - "priceMatch": "NONE", //price match mode - "selfTradePreventionMode": "NONE", //self trading preventation mode - "goodTillDate": 1693207680000 //order pre-set auot cancel time for TIF GTD order + "priceProtect": false, + "priceMatch": "NONE", + "selfTradePreventionMode": "NONE", + "goodTillDate": 1693207680000 } \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeInitialLeverageAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeInitialLeverageAsync.txt deleted file mode 100644 index 0859b79e1..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeInitialLeverageAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "leverage": 21, - "maxQty": "1000", // maximum quantity of base asset - "symbol": "BTCUSD_200925" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeMarginTypeAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeMarginTypeAsync.txt deleted file mode 100644 index f68be41bd..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ChangeMarginTypeAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "code": 200, - "msg": "success" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetAccountInfoAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetAccountInfoAsync.txt deleted file mode 100644 index d5052df2d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetAccountInfoAsync.txt +++ /dev/null @@ -1,70 +0,0 @@ -{ - "assets": [ - { - "asset": "BTC", // asset name - "walletBalance": "0.00241969", // total wallet balance - "unrealizedProfit": "0.00000000", // unrealized profit or loss - "marginBalance": "0.00241969", // margin balance - "maintMargin": "0.00000000", // maintenance margin - "initialMargin": "0.00000000", // total intial margin required with the latest mark price - "positionInitialMargin": "0.00000000", // positions" margin required with the latest mark price - "openOrderInitialMargin": "0.00000000", // open orders" intial margin required with the latest mark price - "maxWithdrawAmount": "0.00241969", // available amount for transfer out - "crossWalletBalance": "0.00241969", // wallet balance for crossed margin - "crossUnPnl": "0.00000000", // total unrealized profit or loss of crossed positions - "availableBalance": "0.00241969" // available margin balance - } - ], - "positions": [ - { - "symbol": "BTCUSD_201225", - "positionAmt":"0", // position amount - "initialMargin": "0", - "maintMargin": "0", - "unrealizedProfit": "0.00000000", - "positionInitialMargin": "0", - "openOrderInitialMargin": "0", - "leverage": "125", - "isolated": false, - "positionSide": "BOTH", // BOTH means that it is the position of One-way Mode - "entryPrice": "0.0", - "maxQty": "50", // maximum quantity of base asset - "updateTime": 0 - }, - { - "symbol": "BTCUSD_201225", - "positionAmt":"0", - "initialMargin": "0", - "maintMargin": "0", - "unrealizedProfit": "0.00000000", - "positionInitialMargin": "0", - "openOrderInitialMargin": "0", - "leverage": "125", - "isolated": false, - "positionSide": "LONG", // LONG or SHORT means that it is the position of Hedge Mode - "entryPrice": "0.0", - "maxQty": "50", - "updateTime": 0 - }, - { - "symbol": "BTCUSD_201225", - "positionAmt":"0", - "initialMargin": "0", - "maintMargin": "0", - "unrealizedProfit": "0.00000000", - "positionInitialMargin": "0", - "openOrderInitialMargin": "0", - "leverage": "125", - "isolated": false, - "positionSide": "SHORT", // LONG or SHORT means that it is the position of Hedge Mode - "entryPrice": "0.0", - "maxQty": "50", - "updateTime":1627026881327 - } - ], - "canDeposit": true, - "canTrade": true, - "canWithdraw": true, - "feeTier": 2, - "updateTime": 0 - } \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBalancesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBalancesAsync.txt deleted file mode 100644 index 86537b618..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBalancesAsync.txt +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "accountAlias": "SgsR", // unique account code - "asset": "BTC", - "balance": "0.00250000", - "withdrawAvailable": "0.00250000", - "crossWalletBalance": "0.00241969", - "crossUnPnl": "0.00000000", - "availableBalance": "0.00241969", - "updateTime": 1592468353979 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBracketsAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBracketsAsync.txt deleted file mode 100644 index 74c972589..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetBracketsAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "pair": "BTCUSD", - "brackets": [ - { - "bracket": 1, // bracket level - "initialLeverage": 125, // the maximum leverage - "qtyCap": 50, // upper edge of base asset quantity - "qtylFloor": 0, // lower edge of base asset quantity - "maintMarginRatio": 0.004 // maintenance margin rate - }, - ] - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetIncomeHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetIncomeHistoryAsync.txt deleted file mode 100644 index 814c5caff..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetIncomeHistoryAsync.txt +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "symbol": "", // trade symbol, if existing - "incomeType": "TRANSFER", // income type - "income": "-0.37500000", // income amount - "asset": "BTC", // income asset - "info":"WITHDRAW", // extra information - "time": 1570608000000, - "tranId":"9689322392", // transaction id - "tradeId":"" // trade id, if existing - }, - { - "symbol": "BTCUSD_200925", - "incomeType": "COMMISSION", - "income": "-0.01000000", - "asset": "BTC", - "info":"", - "time": 1570636800000, - "tranId":"9689322392", - "tradeId":"2059192" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetMarginChangeHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetMarginChangeHistoryAsync.txt deleted file mode 100644 index ec94bb8ea..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetMarginChangeHistoryAsync.txt +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "amount": "23.36332311", - "asset": "BTC", - "symbol": "BTCUSD_200925", - "time": 1578047897183, - "type": 1, - "positionSide": "BOTH" - }, - { - "amount": "100", - "asset": "BTC", - "symbol": "BTCUSD_200925", - "time": 1578047900425, - "type": 1, - "positionSide": "LONG" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionAdlQuantileEstimationAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionAdlQuantileEstimationAsync.txt deleted file mode 100644 index eaefa2476..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionAdlQuantileEstimationAsync.txt +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "symbol": "BTCUSD_200925", - "adlQuantile": - { - // if the positions of the symbol are crossed margined in Hedge Mode, "LONG" and "SHORT" will be returned a same quantile value, and "HEDGE" will be returned instead of "BOTH". - "LONG": 3, - "SHORT": 3, - "HEDGE": 0 // only a sign, ignore the value - } - }, - { - "symbol": "BTCUSD_201225", - "adlQuantile": - { - // for positions of the symbol are in One-way Mode or isolated margined in Hedge Mode - "LONG": 1, // adl quantile for "LONG" position in hedge mode - "SHORT": 2, // adl qauntile for "SHORT" position in hedge mode - "BOTH": 0 // adl qunatile for position in one-way mode - } - } - ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionInformationAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionInformationAsync.txt deleted file mode 100644 index 00bc124c1..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionInformationAsync.txt +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "symbol": "BTCUSD_201225", - "positionAmt": "0", - "entryPrice": "0.0", - "markPrice": "0.00000000", - "unRealizedProfit": "0.00000000", - "liquidationPrice": "0", - "leverage": "125", - "maxQty": "50", // maximum quantity of base asset - "marginType": "cross", - "isolatedMargin": "0.00000000", - "isAutoAddMargin": "false", - "positionSide": "BOTH", - "updateTime": 0 - }, - { - "symbol": "BTCUSD_201225", - "positionAmt": "1", - "entryPrice": "11707.70000003", - "markPrice": "11788.66626667", - "unRealizedProfit": "0.00005866", - "liquidationPrice": "11667.63509587", - "leverage": "125", - "maxQty": "50", - "marginType": "cross", - "isolatedMargin": "0.00012357", - "isAutoAddMargin": "false", - "positionSide": "LONG", - "updateTime": 0 - }, - { - "symbol": "BTCUSD_201225", - "positionAmt": "0", - "entryPrice": "0.0", - "markPrice": "0.00000000", - "unRealizedProfit": "0.00000000", - "liquidationPrice": "0", - "leverage": "125", - "maxQty": "50", - "marginType": "cross", - "isolatedMargin": "0.00000000", - "isAutoAddMargin": "false", - "positionSide": "SHORT", - "updateTime":1627026881327 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionModeAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionModeAsync.txt deleted file mode 100644 index eb1ce097c..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/GetPositionModeAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dualSidePosition": true // "true": Hedge Mode; "false": One-way Mode -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionMarginAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionMarginAsync.txt deleted file mode 100644 index b51e5e565..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionMarginAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - "amount": 100.0, - "code": 200, - "msg": "Successfully modify position margin.", - "type": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionModeAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionModeAsync.txt deleted file mode 100644 index f68be41bd..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Account/ModifyPositionModeAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "code": 200, - "msg": "success" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetAggregatedTradeHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetAggregatedTradeHistoryAsync.txt deleted file mode 100644 index 14a7d3c0e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetAggregatedTradeHistoryAsync.txt +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "a": 416690, // Aggregate tradeId - "p": "9642.4", // Price - "q": "3", // Quantity - "f": 595259, // First tradeId - "l": 595259, // Last tradeId - "T": 1591250548649, // Timestamp - "m": false, // Was the buyer the maker? - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBasisAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBasisAsync.txt deleted file mode 100644 index 052ae4e62..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBasisAsync.txt +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "pair": "BTCUSD", - "contractType": "CURRENT_QUARTER", - "futuresPrice": "9753.22", - "indexPrice": "9746.78", - "basis": "5.14", - "basisRate": "0.0017", //0.17% - "timestamp": 1591261042378 - }, - { - "pair": "BTCUSD", - "contractType": "CURRENT_QUARTER", - "futuresPrice": "9353.22", - "indexPrice": "9336.78", - "basis": "2.14", - "basisRate": "0.0017", - "timestamp": 1585615200000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBookPricesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBookPricesAsync.txt deleted file mode 100644 index cc1f746fd..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetBookPricesAsync.txt +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "symbol": "BTCUSD_200626", - "pair": "BTCUSD", - "bidPrice": "9650.1", - "bidQty": "16", - "askPrice": "9650.3", - "askQty": "7", - "time": 1591257300345 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetContinuousContractKlinesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetContinuousContractKlinesAsync.txt deleted file mode 100644 index b16eae5b2..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetContinuousContractKlinesAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - [ - 1591258320000, // Open time - "9640.7", // Open - "9642.4", // High - "9640.6", // Low - "9642.0", // Close (or latest price) - "206", // Volume - 1591258379999, // Close time - "2.13660389", // Base asset volume - 48, // Number of trades - "119", // Taker buy volume - "1.23424865", // Taker buy base asset volume - "0" // Ignore. - ] -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetExchangeInfoAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetExchangeInfoAsync.txt deleted file mode 100644 index cf6c5bb00..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetExchangeInfoAsync.txt +++ /dev/null @@ -1,88 +0,0 @@ -{ - "exchangeFilters": [], - "rateLimits": [ - { - "interval": "MINUTE", - "intervalNum": 1, - "limit": 6000, - "rateLimitType": "REQUEST_WEIGHT" - }, - { - "interval": "MINUTE", - "intervalNum": 1, - "limit": 6000, - "rateLimitType": "ORDERS" - } - ], - "serverTime": 1565613908500, // Ignore please. If you want to check current server time, please check via "GET /dapi/v1/time" - "symbols": [ // contract symbols - { - "filters": [ - { - "filterType": "PRICE_FILTER", - "maxPrice": "100000", - "minPrice": "0.1", - "tickSize": "0.1" - }, - { - "filterType": "LOT_SIZE", - "maxQty": "100000", - "minQty": "1", - "stepSize": "1" - }, - { - "filterType": "MARKET_LOT_SIZE", - "maxQty": "100000", - "minQty": "1", - "stepSize": "1" - }, - { - "filterType": "MAX_NUM_ORDERS", - "limit": 200 - }, - { - "filterType": "PERCENT_PRICE", - "multiplierUp": "1.0500", - "multiplierDown": "0.9500", - "multiplierDecimal": 4 - } - ], - "orderTypes": [ - "LIMIT", - "MARKET", - "STOP", - "TAKE_PROFIT", - "TRAILING_STOP_MARKET" - ], - "timeInForce": [ - "GTC", - "IOC", - "FOK", - "GTX" - ], - "liquidationFee": "0.010000", // liquidation fee rate - "marketTakeBound": "0.30", // the max price difference rate( from mark price) a market order can make - "symbol": "BTCUSD_200925", // contract symbol name - "pair": "BTCUSD", // underlying symbol - "contractType": "CURRENT_QUARTER", - "deliveryDate": 1601020800000, - "onboardDate": 1590739200000, - "contractStatus": "TRADING", - "contractSize": 100, - "quoteAsset": "USD", - "baseAsset": "BTC", - "marginAsset": "BTC", - "pricePrecision": 1, // please do not use it as tickSize - "quantityPrecision": 0, // please do not use it as stepSize - "baseAssetPrecision": 8, - "quotePrecision": 8, - "equalQtyPrecision": 4, // ignore - "triggerProtect": "0.0500", // threshold for algo order with "priceProtect" - "maintMarginPercent": "2.5000", // ignore - "requiredMarginPercent": "5.0000", // ignore - "underlyingType": "COIN", - "underlyingSubType": [] - } - ], - "timezone": "UTC" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingInfoAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingInfoAsync.txt deleted file mode 100644 index 1124bd69f..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingInfoAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "symbol": "BLZUSDT", - "adjustedFundingRateCap": "0.02500000", - "adjustedFundingRateFloor": "-0.02500000", - "fundingIntervalHours": 8 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingRatesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingRatesAsync.txt deleted file mode 100644 index 78b09d1da..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetFundingRatesAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "symbol": "BTCUSD_PERP", - "fundingTime": 1698768000000, - "fundingRate": "-0.00300000", - "markPrice": "34651.40000000" // mark price associated with a particular funding fee charge - }, - { - "symbol": "BTCUSD_PERP", - "fundingTime": 1698796800000, - "fundingRate": "-0.00300000", - "markPrice": "34651.40000000" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatioAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatioAsync.txt deleted file mode 100644 index b923921c7..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetGlobalLongShortAccountRatioAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "pair": "BTCUSD", - "longShortRatio": "0.1960", - "longAccount": "0.6622", //66.22% - "shortAccount": "0.3378", //33.78% - "timestamp": 1583139600000 - }, - { - "pair": "BTCUSD", - "longShortRatio": "1.9559", - "longAccount": "0.6617", - "shortAccount": "0.3382", - "timestamp": 1583139900000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetIndexPriceKlinesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetIndexPriceKlinesAsync.txt deleted file mode 100644 index c00dffd0c..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetIndexPriceKlinesAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - [ - 1591256400000, // Open time - "9653.69440000", // Open - "9653.69640000", // High - "9651.38600000", // Low - "9651.55200000", // Close (or latest price) - "0 ", // Ignore - 1591256459999, // Close time - "0", // Ignore - 60, // Number of bisic data - "0", // Ignore - "0", // Ignore - "0" // Ignore - ] -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetKlinesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetKlinesAsync.txt deleted file mode 100644 index b16eae5b2..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetKlinesAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - [ - 1591258320000, // Open time - "9640.7", // Open - "9642.4", // High - "9640.6", // Low - "9642.0", // Close (or latest price) - "206", // Volume - 1591258379999, // Close time - "2.13660389", // Base asset volume - 48, // Number of trades - "119", // Taker buy volume - "1.23424865", // Taker buy base asset volume - "0" // Ignore. - ] -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPriceKlinesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPriceKlinesAsync.txt deleted file mode 100644 index 0d87b3b0a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPriceKlinesAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - [ - 1591256460000, // Open time - "9653.29201333", // Open - "9654.56401333", // High - "9653.07367333", // Low - "9653.07367333", // Close (or latest price) - "0 ", // Ignore - 1591256519999, // Close time - "0", // Ignore - 60, // Number of bisic data - "0", // Ignore - "0", // Ignore - "0" // Ignore - ] -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPricesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPricesAsync.txt deleted file mode 100644 index be83b10cd..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetMarkPricesAsync.txt +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "symbol": "BTCUSD_PERP", - "pair": "BTCUSD", - "markPrice": "11029.69574559", // mark price - "indexPrice": "10979.14437500", // index price - "estimatedSettlePrice": "10981.74168236", // Estimated Settle Price, only useful in the last hour before the settlement starts. - "lastFundingRate": "0.00071003", // the lasted funding rate, for perpetual contract symbols only. For delivery symbols, "" will be shown. - "interestRate": "0.00010000", // the base asset interest rate, for perpetual contract symbols only. For delivery symbols, "" will be shown. - "nextFundingTime": 1596096000000, // For perpetual contract symbols only. For delivery symbols, 0 will be shown - "time": 1596094042000 - }, - { - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "markPrice": "12077.01343750", - "indexPrice": "10979.10312500", - "estimatedSettlePrice": "10981.74168236", - "lastFundingRate": "", - "interestRate": "", - "nextFundingTime": 0, - "time": 1596094042000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestAsync.txt deleted file mode 100644 index 37ab0c851..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestAsync.txt +++ /dev/null @@ -1,7 +0,0 @@ -{ - "symbol": "BTCUSD_200626", - "pair": "BTCUSD", - "openInterest": "15004", - "contractType": "CURRENT_QUARTER", - "time": 1591261042378 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestHistoryAsync.txt deleted file mode 100644 index c0812d1a9..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOpenInterestHistoryAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "pair": "BTCUSD", - "contractType": "CURRENT_QUARTER", - "sumOpenInterest": "20403", //unit: cont - "sumOpenInterestValue": "176196512.23400000", //unit: base asset - "timestamp": 1591261042378 - }, - { - "pair": "BTCUSD", - "contractType": "CURRENT_QUARTER", - "sumOpenInterest": "20401", - "sumOpenInterestValue": "176178704.98700000", - "timestamp": 1583128200000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOrderBookAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOrderBookAsync.txt deleted file mode 100644 index 4f7c9f610..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetOrderBookAsync.txt +++ /dev/null @@ -1,19 +0,0 @@ -{ - "lastUpdateId": 16769853, - "symbol": "BTCUSD_PERP", // Symbol - "pair": "BTCUSD", // Pair - "E": 1591250106370, // Message output time - "T": 1591250106368, // Transaction time - "bids": [ - [ - "9638.0", // PRICE - "431" // QTY - ] - ], - "asks": [ - [ - "9638.2", - "12" - ] - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetPricesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetPricesAsync.txt deleted file mode 100644 index d42f0a727..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetPricesAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "symbol": "BTCUSD_200626", - "ps": "9647.8", // pair - "price": "9647.8", - "time": 1591257246176 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetRecentTradesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetRecentTradesAsync.txt deleted file mode 100644 index a1d531802..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetRecentTradesAsync.txt +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": 28457, - "price": "9635.0", - "qty": "1", - "baseQty": "0.01037883", - "time": 1591250192508, - "isBuyerMaker": true, - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatioAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatioAsync.txt deleted file mode 100644 index cd34c906d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTakerBuySellVolumeRatioAsync.txt +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "pair": "BTCUSD", - "contractType": "CURRENT_QUARTER", - "takerBuyVol": "387", //unit: cont - "takerSellVol": "248", //unit: cont - "takerBuyVolValue": "2342.1220", //unit: base asset - "takerSellVolValue": "4213.9800", //unit: base asset - "timestamp": 1591261042378 - }, - { - "pair": "BTCUSD", - "contractType": "CURRENT_QUARTER", - "takerBuyVol": "234", //unit: cont - "takerSellVol": "121", //unit: cont - "takerBuyVolValue": "4563.1320", //unit: base asset - "takerSellVolValue": "3313.3940", //unit: base asset - "timestamp": 1585615200000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTickersAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTickersAsync.txt deleted file mode 100644 index fee6c2ceb..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTickersAsync.txt +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "priceChange": "136.6", - "priceChangePercent": "1.436", - "weightedAvgPrice": "9547.3", - "lastPrice": "9651.6", - "lastQty": "1", - "openPrice": "9515.0", - "highPrice": "9687.0", - "lowPrice": "9499.5", - "volume": "494109", - "baseVolume": "5192.94797687", - "openTime": 1591170300000, - "closeTime": 1591256718418, - "firstId": 600507, // First tradeId - "lastId": 697803, // Last tradeId - "count": 97297 // Trade count - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortAccountRatioAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortAccountRatioAsync.txt deleted file mode 100644 index c21d45ef0..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortAccountRatioAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "pair": "BTCUSD", - "longShortRatio": "1.8105", - "longAccount": "0.6442", //64.42% - "shortAccount": "0.3558", //35.58% - "timestamp": 1591261042378 - }, - { - "pair": "BTCUSD", - "longShortRatio": "1.1110", - "longAccount": "0.5263", - "shortAccount": "0.4737", - "timestamp": 1592870400000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortPositionRatioAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortPositionRatioAsync.txt deleted file mode 100644 index 271afe6ee..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTopLongShortPositionRatioAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "pair": "BTCUSD", - "longShortRatio": "0.7869", - "longPosition": "0.6442", //64.42% - "shortPosition": "0.4404", //44.04% - "timestamp": 1592870400000 - }, - { - "pair": "BTCUSD", - "longShortRatio": "1.1231", - "longPosition": "0.2363", - "shortPosition": "0.4537", - "timestamp": 1592956800000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTradeHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTradeHistoryAsync.txt deleted file mode 100644 index 267f34500..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/ExchangeData/GetTradeHistoryAsync.txt +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": 595103, - "price": "9642.2", - "qty": "1", - "baseQty": "0.01037108", - "time": 1499865549590, - "isBuyerMaker": true, - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/AggTradeUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/AggTradeUpdate.txt deleted file mode 100644 index 94e6a5d9c..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/AggTradeUpdate.txt +++ /dev/null @@ -1,12 +0,0 @@ -{ - "e": "aggTrade", // Event type - "E": 123456789, // Event time - "s": "BTCUSDT", // Symbol - "a": 5933014, // Aggregate trade ID - "p": "0.001", // Price - "q": "100", // Quantity - "f": 100, // First trade ID - "l": 105, // Last trade ID - "T": 123456785, // Trade time - "m": true, // Is the buyer the market maker? -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/BookTickerUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/BookTickerUpdate.txt deleted file mode 100644 index 008c9ebf7..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/BookTickerUpdate.txt +++ /dev/null @@ -1,11 +0,0 @@ -{ - "e":"bookTicker", // event type - "u":400900217, // order book updateId - "E": 1568014460893, // event time - "T": 1568014460891, // transaction time - "s":"BNBUSDT", // symbol - "b":"25.35190000", // best bid price - "B":"31.21000000", // best bid qty - "a":"25.36520000", // best ask price - "A":"40.66000000" // best ask qty -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/ContractInfoUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/ContractInfoUpdate.txt deleted file mode 100644 index abe9692e3..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/ContractInfoUpdate.txt +++ /dev/null @@ -1,30 +0,0 @@ -{ - "e":"contractInfo", // Event Type - "E":1669356423908, // Event Time - "s":"IOTAUSDT", // Symbol - "ps":"IOTAUSDT", // Pair - "ct":"PERPETUAL", // Contract type - "dt":4133404800000, // Delivery date time - "ot":1569398400000, // onboard date time - "cs":"TRADING", // Contract status - "bks":[ - { - "bs":1, // Notional bracket - "bnf":0, // Floor notional of this bracket - "bnc":5000, // Cap notional of this bracket - "mmr":0.01, // Maintenance ratio for this bracket - "cf":0, // Auxiliary number for quick calculation - "mi":21, // Min leverage for this bracket - "ma":50 // Max leverage for this bracket - }, - { - "bs":2, - "bnf":5000, - "bnc":25000, - "mmr":0.025, - "cf":75, - "mi":11, - "ma":20 - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/IndexPriceUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/IndexPriceUpdate.txt deleted file mode 100644 index 3c6786c87..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/IndexPriceUpdate.txt +++ /dev/null @@ -1,6 +0,0 @@ - { - "e": "indexPriceUpdate", // Event type - "E": 1591261236000, // Event time - "i": "BTCUSD", // Pair - "p": "9636.57860000", // Index Price - } \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/KlineUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/KlineUpdate.txt deleted file mode 100644 index 7c529bac3..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/KlineUpdate.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "e":"kline", // Event type - "E":1591261542539, // Event time - "s":"BTCUSD_200626", // Symbol - "k":{ - "t":1591261500000, // Kline start time - "T":1591261559999, // Kline close time - "s":"BTCUSD_200626", // Symbol - "i":"1m", // Interval - "f":606400, // First trade ID - "L":606430, // Last trade ID - "o":"9638.9", // Open price - "c":"9639.8", // Close price - "h":"9639.8", // High price - "l":"9638.6", // Low price - "v":"156", // volume - "n":31, // Number of trades - "x":false, // Is this kline closed? - "q":"1.61836886", // Base asset volume - "V":"73", // Taker buy volume - "Q":"0.75731156", // Taker buy base asset volume - "B":"0" // Ignore - } -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/LiquidationOrderUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/LiquidationOrderUpdate.txt deleted file mode 100644 index 0fe59e60d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/LiquidationOrderUpdate.txt +++ /dev/null @@ -1,21 +0,0 @@ -{ - - "e":"forceOrder", // Event Type - "E":1568014460893, // Event Time - "o":{ - - "s":"BTCUSDT", // Symbol - "S":"SELL", // Side - "o":"LIMIT", // Order Type - "f":"IOC", // Time in Force - "q":"0.014", // Original Quantity - "p":"9910", // Price - "ap":"9910", // Average Price - "X":"FILLED", // Order Status - "l":"0.014", // Order Last Filled Quantity - "z":"0.014", // Order Filled Accumulated Quantity - "T":1568014460893, // Order Trade Time - - } - -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MarkPriceUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MarkPriceUpdate.txt deleted file mode 100644 index 45390bf87..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MarkPriceUpdate.txt +++ /dev/null @@ -1,10 +0,0 @@ -{ - "e":"markPriceUpdate", // Event type - "E":1596095725000, // Event time - "s":"BTCUSD_201225", // Symbol - "p":"10934.62615417", // Mark Price - "P":"10962.17178236", // Estimated Settle Price, only useful in the last hour before the settlement starts. - "i":"10933.62615417", // Index Price - "r":"", // funding rate for perpetual symbol, "" will be shown for delivery symbol - "T":0 // next funding time for perpetual symbol, 0 will be shown for delivery symbol -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MiniTickerUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MiniTickerUpdate.txt deleted file mode 100644 index a648694c6..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/MiniTickerUpdate.txt +++ /dev/null @@ -1,12 +0,0 @@ -{ - "e":"24hrMiniTicker", // Event type - "E":1591267704450, // Event time - "s":"BTCUSD_200626", // Symbol - "ps":"BTCUSD", // Pair - "c":"9561.7", // Close price - "o":"9580.9", // Open price - "h":"10000.0", // High price - "l":"7000.0", // Low price - "v":"487476", // Total traded volume - "q":"33264343847.22378500" // Total traded base asset volume -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/OrderBookUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/OrderBookUpdate.txt deleted file mode 100644 index 793971a9d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/OrderBookUpdate.txt +++ /dev/null @@ -1,21 +0,0 @@ -{ - "e": "depthUpdate", // Event type - "E": 123456789, // Event time - "T": 123456788, // Transaction time - "s": "BTCUSDT", // Symbol - "U": 157, // First update ID in event - "u": 160, // Final update ID in event - "pu": 149, // Final update Id in last stream(ie `u` in last stream) - "b": [ // Bids to be updated - [ - "0.0024", // Price level to be updated - "10" // Quantity - ] - ], - "a": [ // Asks to be updated - [ - "0.0026", // Price level to be updated - "100" // Quantity - ] - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/PartialBookUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/PartialBookUpdate.txt deleted file mode 100644 index 4f357ec41..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/PartialBookUpdate.txt +++ /dev/null @@ -1,53 +0,0 @@ -{ - "e": "depthUpdate", // Event type - "E": 1571889248277, // Event time - "T": 1571889248276, // Transaction time - "s": "BTCUSDT", - "U": 390497796, - "u": 390497878, - "pu": 390497794, - "b": [ // Bids to be updated - [ - "7403.89", // Price Level to be - "0.002" // Quantity - ], - [ - "7403.90", - "3.906" - ], - [ - "7404.00", - "1.428" - ], - [ - "7404.85", - "5.239" - ], - [ - "7405.43", - "2.562" - ] - ], - "a": [ // Asks to be updated - [ - "7405.96", // Price level to be - "3.340" // Quantity - ], - [ - "7406.63", - "4.525" - ], - [ - "7407.08", - "2.475" - ], - [ - "7407.15", - "4.800" - ], - [ - "7407.20", - "0.175" - ] - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/TickerUpdate.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/TickerUpdate.txt deleted file mode 100644 index fb5b9a0a9..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Socket/TickerUpdate.txt +++ /dev/null @@ -1,20 +0,0 @@ -{ - "e": "24hrTicker", // Event type - "E": 123456789, // Event time - "s": "BTCUSDT", // Symbol - "p": "0.0015", // Price change - "P": "250.00", // Price change percent - "w": "0.0018", // Weighted average price - "c": "0.0025", // Last price - "Q": "10", // Last quantity - "o": "0.0010", // Open price - "h": "0.0025", // High price - "l": "0.0010", // Low price - "v": "10000", // Total traded base asset volume - "q": "18", // Total traded quote asset volume - "O": 0, // Statistics open time - "C": 86400000, // Statistics close time - "F": 0, // First trade ID - "L": 18150, // Last trade Id - "n": 18151 // Total number of trades -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAfterTimeoutAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAfterTimeoutAsync.txt deleted file mode 100644 index 75afcc746..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAfterTimeoutAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "symbol": "BTCUSD_200925", - "countdownTime": "100000" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAsync.txt deleted file mode 100644 index 5391662b9..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelAllOrdersAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "code": "200", - "msg": "The operation of cancel all open order is done." -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelOrderAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelOrderAsync.txt deleted file mode 100644 index e9768b89f..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/CancelOrderAsync.txt +++ /dev/null @@ -1,26 +0,0 @@ -{ - "avgPrice": "0.0", - "clientOrderId": "myOrder1", - "cumQty": "0", - "cumBase": "0", - "executedQty": "0", - "orderId": 283194212, - "origQty": "11", - "origType": "TRAILING_STOP_MARKET", - "price": "0", - "reduceOnly": false, - "side": "BUY", - "positionSide": "SHORT", - "status": "CANCELED", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "timeInForce": "GTC", - "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1571110484038, - "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetForcedOrdersAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetForcedOrdersAsync.txt deleted file mode 100644 index 88dfe55fd..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetForcedOrdersAsync.txt +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "orderId": 165123080, - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "status": "FILLED", - "clientOrderId": "autoclose-1596542005017000006", - "price": "11326.9", - "avgPrice": "11326.9", - "origQty": "1", - "executedQty": "1", - "cumBase": "0.00882854", - "timeInForce": "IOC", - "type": "LIMIT", - "reduceOnly": false, - "closePosition": false, - "side": "SELL", - "positionSide": "BOTH", - "stopPrice": "0", - "workingType": "CONTRACT_PRICE", - "priceProtect": false, - "origType": "LIMIT", - "time": 1596542005019, - "updateTime": 1596542005050 - }, - { - "orderId": 207251986, - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "status": "FILLED", - "clientOrderId": "autoclose-1597307316020000006", - "price": "11619.4", - "avgPrice": "11661.2", - "origQty": "1", - "executedQty": "1", - "cumBase": "0.00857544", - "timeInForce": "IOC", - "type": "LIMIT", - "reduceOnly": false, - "closePosition": false, - "side": "SELL", - "positionSide": "LONG", - "stopPrice": "0", - "workingType": "CONTRACT_PRICE", - "priceProtect": false, - "origType": "LIMIT", - "time": 1597307316022, - "updateTime": 1597307316035 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrderAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrderAsync.txt deleted file mode 100644 index dcee4093a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrderAsync.txt +++ /dev/null @@ -1,26 +0,0 @@ -{ - "avgPrice": "0.0", - "clientOrderId": "abc", - "cumBase": "0", - "executedQty": "0", - "orderId": 1917641, - "origQty": "0.40", - "origType": "TRAILING_STOP_MARKET", - "price": "0", - "reduceOnly": false, - "side": "BUY", - "positionSide": "SHORT", - "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "time": 1579276756075, // order time - "timeInForce": "GTC", - "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, - "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrdersAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrdersAsync.txt deleted file mode 100644 index d0ee0958f..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOpenOrdersAsync.txt +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "avgPrice": "0.0", - "clientOrderId": "abc", - "cumBase": "0", - "executedQty": "0", - "orderId": 1917641, - "origQty": "0.40", - "origType": "TRAILING_STOP_MARKET", - "price": "0", - "reduceOnly": false, - "side": "BUY", - "positionSide": "SHORT", - "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All - "symbol": "BTCUSD_200925", - "time": 1579276756075, // order time - "timeInForce": "GTC", - "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time - "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrderAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrderAsync.txt deleted file mode 100644 index 0c3355a38..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrderAsync.txt +++ /dev/null @@ -1,25 +0,0 @@ -{ - "avgPrice": "0.0", - "clientOrderId": "abc", - "cumBase": "0", - "executedQty": "0", - "orderId": 1917641, - "origQty": "0.40", - "origType": "TRAILING_STOP_MARKET", - "price": "0", - "reduceOnly": false, - "side": "BUY", - "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "time": 1579276756075, // order time - "timeInForce": "GTC", - "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time - "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrdersAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrdersAsync.txt deleted file mode 100644 index 4bd9b3baa..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetOrdersAsync.txt +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "avgPrice": "0.0", - "clientOrderId": "abc", - "cumBase": "0", - "executedQty": "0", - "orderId": 1917641, - "origQty": "0.40", - "origType": "TRAILING_STOP_MARKET", - "price": "0", - "reduceOnly": false, - "side": "BUY", - "positionSide": "SHORT", - "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "time": 1579276756075, // order time - "timeInForce": "GTC", - "type": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1579276756075, // update time - "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetUserTradesAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetUserTradesAsync.txt deleted file mode 100644 index 690a4a60d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/GetUserTradesAsync.txt +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - 'symbol': 'BTCUSD_200626', - 'id': 6, - 'orderId': 28, - 'pair': 'BTCUSD', - 'side': 'SELL', - 'price': '8800', - 'qty': '1', - 'realizedPnl': '0', - 'marginAsset': 'BTC', - 'baseQty': '0.01136364', - 'commission': '0.00000454', - 'commissionAsset': 'BTC', - 'time': 1590743483586, - 'positionSide': 'BOTH', - 'buyer': false, - 'maker': false - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/PlaceOrderAsync.txt b/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/PlaceOrderAsync.txt deleted file mode 100644 index 6c9fb5c8e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/CoinFutures/Trading/PlaceOrderAsync.txt +++ /dev/null @@ -1,26 +0,0 @@ -{ - "clientOrderId": "testOrder", - "cumQty": "0", - "cumBase": "0", - "executedQty": "0", - "orderId": 22542179, - "avgPrice": "0.0", - "origQty": "10", - "price": "0", - "reduceOnly": false, - "side": "BUY", - "positionSide": "SHORT", - "status": "NEW", - "stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET - "closePosition": false, // if Close-All - "symbol": "BTCUSD_200925", - "pair": "BTCUSD", - "timeInForce": "GTC", - "type": "TRAILING_STOP_MARKET", - "origType": "TRAILING_STOP_MARKET", - "activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order - "priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order - "updateTime": 1566818724722, - "workingType": "CONTRACT_PRICE", - "priceProtect": false // if conditional order trigger is protected -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/AdjustLTVAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/AdjustLTVAsync.txt deleted file mode 100644 index c781c868e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/AdjustLTVAsync.txt +++ /dev/null @@ -1,7 +0,0 @@ -{ - "loanCoin": "BUSD", - "collateralCoin": "BNB", - "direction": "ADDITIONAL", - "amount": "5.235", - "currentLTV": "0.52" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/BorrowAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/BorrowAsync.txt deleted file mode 100644 index b420e9235..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/BorrowAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "loanCoin": "BUSD", - "loanAmount": "100.5", - "collateralCoin": "BNB", - "collateralAmount": "50.5", - "hourlyInterestRate": "0.001234", - "orderId": "100000001" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/CustomizeMarginCallAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/CustomizeMarginCallAsync.txt deleted file mode 100644 index 9aa15cdc7..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/CustomizeMarginCallAsync.txt +++ /dev/null @@ -1,12 +0,0 @@ -{ - "rows": [ - { - "orderId": "100000001", - "collateralCoin": "BNB", - "preMarginCall": "0.8", - "afterMarginCall": "0.7", - "customizeTime": 1575018510000 - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetBorrowHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetBorrowHistoryAsync.txt deleted file mode 100644 index b63ba84d3..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetBorrowHistoryAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -{ - "rows": [ - { - "orderId": 100000001, - "loanCoin": "BUSD", - "initialLoanAmount": "10000", - "hourlyInterestRate": "0.000057", - "loanTerm": "7", - "collateralCoin": "BNB", - "initialCollateralAmount": "49.27565492", - "borrowTime": 1575018510000, - "status": "Repaid" // Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralAssetsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralAssetsAsync.txt deleted file mode 100644 index 4e9d3a852..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralAssetsAsync.txt +++ /dev/null @@ -1,13 +0,0 @@ -{ - "rows": [ - { - "collateralCoin": "BNB", - "initialLTV": "0.65", - "marginCallLTV": "0.75", - "liquidationLTV": "0.83", - "maxLimit": "1000000", - "vipLevel": 1 - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralRepayRateAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralRepayRateAsync.txt deleted file mode 100644 index 51efff6ba..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetCollateralRepayRateAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - "loanCoin": "BUSD", - "collateralCoin": "BNB", - "repayAmount": "1000", - "rate": "300.36781234" // rate of collateral coin/loan coin -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetIncomeHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetIncomeHistoryAsync.txt deleted file mode 100644 index 20e140c2d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetIncomeHistoryAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "asset": "BUSD", - "type": "borrowIn", - "amount": "100", - "timestamp": 1633771139847, - "tranId": "80423589583" - }, - { - "asset": "BUSD", - "type": "borrowIn", - "amount": "100", - "timestamp": 1634638371496, - "tranId": "81685123491" - } - ] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLoanableAssetsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLoanableAssetsAsync.txt deleted file mode 100644 index 654b3a67e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLoanableAssetsAsync.txt +++ /dev/null @@ -1,21 +0,0 @@ -{ - "rows": [ - { - "loanCoin": "BUSD", - "_7dHourlyInterestRate": "0.00000491", - "_7dDailyInterestRate": "0.000118", - "_14dHourlyInterestRate": "0.00000491", - "_14dDailyInterestRate": "0.000118", - "_30dHourlyInterestRate": "0.00000567", - "_30dDailyInterestRate": "0.000136", - "_90dHourlyInterestRate": "0.00000596", - "_90dDailyInterestRate": "0.000143", - "_180dHourlyInterestRate": "0.00000631", - "_180dDailyInterestRate": "0.000151", - "minLimit": "100", - "maxLimit": "1000000", - "vipLevel": 1 - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLtvAdjustHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLtvAdjustHistoryAsync.txt deleted file mode 100644 index 1af772631..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetLtvAdjustHistoryAsync.txt +++ /dev/null @@ -1,15 +0,0 @@ -{ - "rows": [ - { - "loanCoin": "BUSD", - "collateralCoin": "BNB", - "direction": "ADDITIONAL", - "amount": "5.235", - "preLTV": "0.78", - "afterLTV": "0.56", - "adjustTime": 1575018510000, - "orderId": 756783308056935434 - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetOpenBorrowOrdersAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetOpenBorrowOrdersAsync.txt deleted file mode 100644 index ce4474f1a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetOpenBorrowOrdersAsync.txt +++ /dev/null @@ -1,15 +0,0 @@ -{ - "rows": [ - { - "orderId": 100000001, - "loanCoin": "BUSD", - "totalDebt": "10000", - "residualInterest":"10.27687923", - "collateralCoin": "BNB", - "collateralAmount": "49.27565492", - "currentLTV": "0.57", - "expirationTime": 1575018510000 - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetRepayHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetRepayHistoryAsync.txt deleted file mode 100644 index 18c85a70a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/GetRepayHistoryAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -{ - "rows": [ - { - "loanCoin": "BUSD", - "repayAmount": "10000", - "collateralCoin": "BNB", - "collateralUsed": "0", - "collateralReturn": "49.27565492", - "repayType": "1", // 1 for "repay with borrowed coin", 2 for "repay with collateral" - "repayStatus": "Repaid", // Repaid, Repaying, Failed - "repayTime": 1575018510000, - "orderId": 756783308056935434 - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/RepayAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/RepayAsync.txt deleted file mode 100644 index d382c7954..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/CryptoLoans/RepayAsync.txt +++ /dev/null @@ -1,9 +0,0 @@ -{ - "loanCoin": "BUSD", - "remainingPrincipal": "100.5", - "remainingInterest": "0", - "collateralCoin": "BNB", - "remainingCollateral": "5.253", - "currentLTV": "0.25", - "repayStatus": "Repaid" // Repaid, Repaying -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetAccountAsync.txt deleted file mode 100644 index 41609ffff..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetAccountAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "totalAmountInBTC": "0.01067982", - "totalAmountInUSDT": "77.13289230", - "totalFlexibleAmountInBTC": "0.00000000", - "totalFlexibleAmountInUSDT": "0.00000000", - "totalLockedInBTC": "0.01067982", - "totalLockedInUSDT": "77.13289230" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetCollateralRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetCollateralRecordsAsync.txt deleted file mode 100644 index 802cf8008..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetCollateralRecordsAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rows": [ - { - "amount": "100.00000000", - "productId": "BUSD001", - "asset": "USDT", - "createTime": 1575018510000, - "type": "REPAY", - "productName": "USDT", - "orderId": 26055 - } - ], - "total": "1" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexiblePersonalQuotaLeftAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexiblePersonalQuotaLeftAsync.txt deleted file mode 100644 index e007977ce..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexiblePersonalQuotaLeftAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "leftPersonalQuota": "1000" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductPositionsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductPositionsAsync.txt deleted file mode 100644 index 7b3f1c990..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductPositionsAsync.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "rows":[ - { - "totalAmount": "75.46000000", - "tierAnnualPercentageRate": { - "0-5BTC": 0.05, - "5-10BTC": 0.03 - }, - "latestAnnualPercentageRate": "0.02599895", - "yesterdayAirdropPercentageRate": "0.02599895", - "asset": "USDT", - "airDropAsset": "BETH", - "canRedeem": true, - "collateralAmount": "232.23123213", - "productId": "USDT001", - "yesterdayRealTimeRewards": "0.10293829", - "cumulativeBonusRewards": "0.22759183", - "cumulativeRealTimeRewards": "0.22759183", - "cumulativeTotalRewards": "0.45459183", - "autoSubscribe": true - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductsAsync.txt deleted file mode 100644 index dc0dcd043..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleProductsAsync.txt +++ /dev/null @@ -1,22 +0,0 @@ -{ - "rows":[ - { - "asset": "BTC", - "latestAnnualPercentageRate": "0.05000000", - "tierAnnualPercentageRate": { - "0-5BTC": 0.05, - "5-10BTC": 0.03 - }, - "airDropPercentageRate": "0.05000000", - "canPurchase": true, - "canRedeem": true, - "isSoldOut": true, - "hot": true, - "minPurchaseAmount": "0.01000000", - "productId": "BTC001", - "subscriptionStartTime": "1646182276000", - "status": "PURCHASING" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRedemptionRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRedemptionRecordsAsync.txt deleted file mode 100644 index c111ad503..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRedemptionRecordsAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rows": [ - { - "amount": "10.54000000", - "asset": "USDT", - "time": 1577257222000, - "projectId": "USDT001", - "redeemId": 40607, - "destAccount":"SPOT", // SPOT, FUNDING - "status": "PAID" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRewardRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRewardRecordsAsync.txt deleted file mode 100644 index 95b467b59..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleRewardRecordsAsync.txt +++ /dev/null @@ -1,19 +0,0 @@ -{ - "rows": [ - { - "asset": "BUSD", - "rewards": "0.00006408", - "projectId": "USDT001", - "type": "BONUS", - "time": 1577233578000 - }, - { - "asset": "USDT", - "rewards": "0.00687654", - "projectId": "USDT001", - "type": "REALTIME", - "time": 1577233562000 - } - ], - "total": 2 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionPreviewAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionPreviewAsync.txt deleted file mode 100644 index d502f99de..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionPreviewAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "totalAmount": "1232.32230982", - "rewardAsset": "BUSD", - "airDropAsset": "BETH", - "estDailyBonusRewards": "0.22759183", - "estDailyRealTimeRewards": "0.22759183", - "estDailyAirdropRewards": "0.22759183" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionRecordsAsync.txt deleted file mode 100644 index fcc31242c..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetFlexibleSubscriptionRecordsAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -{ - "rows": [ - { - "amount": "100.00000000", - "asset": "USDT", - "time": 1575018510000, - "purchaseId": 26055, - "type": "AUTO", // AUTO for auto subscribe, NORMAL for normal subscription, CONVERT for Locked to Flexible, LOAN for flexible loan collateral, AI for Auto Invest subscribe, TRANSFER for Locked Savings to Flexible - "sourceAccount": "SPOT", // SPOT, FUNDING, SPOTANDFUNDING - "amtFromSpot": "30", // Display if sourceAccount is SPOTANDFUNDING - "amtFromFunding": "70", // Display if sourceAccount is SPOTANDFUNDING - "status": "SUCCESS" // PURCHASING/SUCCESS/FAILED - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedPersonalQuotaLeftAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedPersonalQuotaLeftAsync.txt deleted file mode 100644 index e007977ce..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedPersonalQuotaLeftAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "leftPersonalQuota": "1000" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductPositionsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductPositionsAsync.txt deleted file mode 100644 index c9052cda3..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductPositionsAsync.txt +++ /dev/null @@ -1,19 +0,0 @@ -{ - "rows":[ - { - "positionId": "123123", - "projectId": "Axs*90", - "asset": "AXS", - "amount": "122.09202928", - "purchaseTime": "1646182276000", - "duration": "60", - "accrualDays": "4", - "rewardAsset": "AXS", - "APY": "0.23", - "isRenewable": true, - "isAutoRenew": true, - "redeemDate": "1732182276000" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductsAsync.txt deleted file mode 100644 index 878da3b52..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedProductsAsync.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "rows": [ - { - "projectId": "Axs*90", - "detail": { - "asset": "AXS", - "rewardAsset": "AXS", - "duration": 90, - "renewable": true, - "isSoldOut": true, - "apr": "1.2069", - "status": "CREATED", - "subscriptionStartTime": "1646182276000", - "extraRewardAsset": "BNB", - "extraRewardAPR": "0.23" - }, - "quota": { - "totalPersonalQuota": "2", - "minimum": "0.001" - } - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRedemptionRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRedemptionRecordsAsync.txt deleted file mode 100644 index d20e16266..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRedemptionRecordsAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -{ - "rows": [ - { - "positionId": "123123", - "redeemId": 40607, - "time": 1575018510000, - "asset": "BNB", - "lockPeriod": "30", - "amount": "21312.23223", - "type": "MATURE", //MATURE for redeem to Spot Wallet, NEW_TRANSFERRED for redeem to Flexible product, AHEAD for early redemption - "deliverDate": "1575018510000", - "status": "PAID" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRewardRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRewardRecordsAsync.txt deleted file mode 100644 index f8d0abacb..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedRewardRecordsAsync.txt +++ /dev/null @@ -1,12 +0,0 @@ -{ - "rows": [ - { - "positionId": "123123", - "time": 1575018510000, - "asset": "BNB", - "lockPeriod": "30", - "amount": "21312.23223" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionPreviewAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionPreviewAsync.txt deleted file mode 100644 index 91e988910..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionPreviewAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "rewardAsset": "AXS", - "totalRewardAmt": "5.17181528", - "extraRewardAsset": "BNB", - "estTotalExtraRewardAmt": "5.17181528", - "nextPay": "1.29295383", - "nextPayDate": "1646697600000", - "valueDate": "1646697600000", - "rewardsEndDate": "1651449600000", - "deliverDate": "1651536000000", - "nextSubscriptionDate": "1651536000000" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionRecordsAsync.txt deleted file mode 100644 index e6ce77990..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetLockedSubscriptionRecordsAsync.txt +++ /dev/null @@ -1,18 +0,0 @@ -{ - "rows":[ - { - "positionId": "123123", - "purchaseId": 26055, - "time": 1575018510000, - "asset": "BNB", - "amount": "21312.23223", - "lockPeriod": "30", - "type": "AUTO", // NORMAL for normal subscription, AUTO for auto-subscription order, ACTIVITY for activity order, TRIAL for trial fund order, RESTAKE for restake order - "sourceAccount": "SPOT", // SPOT, FUNDING, SPOTANDFUNDING - "amtFromSpot": "30", // Display if sourceAccount is SPOTANDFUNDING - "amtFromFunding": "70", // Display if sourceAccount is SPOTANDFUNDING - "status": "SUCCESS" // PURCHASING/SUCCESS/FAILED - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetRateHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetRateHistoryAsync.txt deleted file mode 100644 index 6b29e4968..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/GetRateHistoryAsync.txt +++ /dev/null @@ -1,11 +0,0 @@ -{ - "rows": [ - { - "productId": "BUSD001", - "asset": "BUSD", - "annualPercentageRate": "0.00006408", - "time": 1577233578000 - } - ], - "total": "1" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemFlexibleProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemFlexibleProductAsync.txt deleted file mode 100644 index 7171d77ee..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemFlexibleProductAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "redeemId": 40607, - "success": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemLockedProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemLockedProductAsync.txt deleted file mode 100644 index 7171d77ee..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/RedeemLockedProductAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "redeemId": 40607, - "success": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetFlexibleAutoSubscribeAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetFlexibleAutoSubscribeAsync.txt deleted file mode 100644 index 28e7be11d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetFlexibleAutoSubscribeAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "success": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetLockedAutoSubscribeAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetLockedAutoSubscribeAsync.txt deleted file mode 100644 index 28e7be11d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SetLockedAutoSubscribeAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "success": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeFlexibleProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeFlexibleProductAsync.txt deleted file mode 100644 index 366374792..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeFlexibleProductAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "purchaseId": 40607, - "success": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeLockedProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeLockedProductAsync.txt deleted file mode 100644 index 363b683fa..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/SimpleEarn/SubscribeLockedProductAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "purchaseId": 40607, - "positionId": "12345", - "success": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethRateHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethRateHistoryAsync.txt deleted file mode 100644 index 2b61af91d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethRateHistoryAsync.txt +++ /dev/null @@ -1,10 +0,0 @@ -{ - "rows": [ - { - "annualPercentageRate": "0.00006408", // BETH APR - "exchangeRate": "1.00121234", // BETH value per 1 WBETH - "time": 1577233578000 - } - ], - "total": "1" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethUnwrapHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethUnwrapHistoryAsync.txt deleted file mode 100644 index 369c4cc8e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethUnwrapHistoryAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rows": [ - { - "time": 1575018510000, - "fromAsset": "WBETH", - "fromAmount": "21312.23223", - "toAsset": "BETH", - "toAmount": "21312.23223", - "exchangeRate": "1.01243253", // BETH value per 1 WBETH - "status": "SUCCESS" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethWrapHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethWrapHistoryAsync.txt deleted file mode 100644 index 7aace50ed..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetBethWrapHistoryAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rows": [ - { - "time": 1575018510000, - "fromAsset": "BETH", - "fromAmount": "21312.23223", - "toAsset": "WBETH", - "toAmount": "21312.23223", - "exchangeRate": "1.01243253", // BETH value per 1 WBETH - "status": "SUCCESS" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRedemptionHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRedemptionHistoryAsync.txt deleted file mode 100644 index 05394a03f..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRedemptionHistoryAsync.txt +++ /dev/null @@ -1,12 +0,0 @@ -{ - "rows": [ - { - "time": 1575018510000, - "arrivalTime": 1575018510000, - "asset": "BETH", - "amount": "21312.23223", - "status": "SUCCESS" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRewardsHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRewardsHistoryAsync.txt deleted file mode 100644 index e37af342b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthRewardsHistoryAsync.txt +++ /dev/null @@ -1,13 +0,0 @@ -{ - "rows": [ - { - "time": 1575018510000, - "asset": "BETH", - "holding": "2.3223", // BETH holding balance - "amount": "0.23223", // Distributed rewards - "annualPercentageRate": "0.5", // 0.5 means 50% here - "status": "SUCCESS" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingAccountAsync.txt deleted file mode 100644 index a2a188b4e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingAccountAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cumulativeProfitInBETH": "0.01067982", - "lastDayProfitInBETH": "0.01067982" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingHistoryAsync.txt deleted file mode 100644 index 25c649ab4..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingHistoryAsync.txt +++ /dev/null @@ -1,11 +0,0 @@ -{ - "rows": [ - { - "time": 1575018510000, - "asset": "ETH", - "amount": "21312.23223", - "status": "SUCCESS" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingQuotaAsync.txt b/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingQuotaAsync.txt deleted file mode 100644 index 7ce4120c5..000000000 --- a/Binance.Net.UnitTests/JsonResponses/General/Staking/GetEthStakingQuotaAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "leftStakingPersonalQuota": "1000", // Show min(Daily available limit, total personal staking quota) - "leftRedemptionPersonalQuota": "1000" // Show min(Daily personal redeem quota, total redemption limit) -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/AddIpRestrictionForSubAccountApiKeyAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/AddIpRestrictionForSubAccountApiKeyAsync.txt deleted file mode 100644 index 4390ff39a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/AddIpRestrictionForSubAccountApiKeyAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ - { - "subaccountId": "1", - "apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", - "ip":"54.128.193.23", - "updateTime": 1544433328000 - } diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountMarginInterestAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountMarginInterestAsync.txt deleted file mode 100644 index e67a29667..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountMarginInterestAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "subAccountId":1, - "interestBNBBurn":true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountSpotAndMarginAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountSpotAndMarginAsync.txt deleted file mode 100644 index 091db2d5b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeBnbBurnForSubAccountSpotAndMarginAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "subAccountId":1, - "spotBNBBurn":true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeIpRestrictionForSubAccountApiKeyAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeIpRestrictionForSubAccountApiKeyAsync.txt deleted file mode 100644 index 0f2352b6a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeIpRestrictionForSubAccountApiKeyAsync.txt +++ /dev/null @@ -1,10 +0,0 @@ - { - "subaccountId": "1", - "ipRestrict": true, - "apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", - "ipList": [ - "54.128.193.23", - "542.234.192.290" - ], - "updateTime": 1544433328000 - } \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountApiKeyPermissionAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountApiKeyPermissionAsync.txt deleted file mode 100644 index 4511a474a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountApiKeyPermissionAsync.txt +++ /dev/null @@ -1,7 +0,0 @@ -{ - "subaccountId": "1", - "apikey":"vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", - "canTrade": true, - "marginTrade": true, - "futuresTrade": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCoinFuturesCommissionAdjustmentAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCoinFuturesCommissionAdjustmentAsync.txt deleted file mode 100644 index fccf51160..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCoinFuturesCommissionAdjustmentAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "subAccountId": 1, - "pair": "BTCUSD", - "makerAdjustment": 150, // COIN-Ⓜ futures commission adjustment for maker - "takerAdjustment": 150, // COIN-Ⓜ futures commission adjustment for taker - "makerCommission": 450, // COIN-Ⓜ futures commission (after adjusted) for maker - "takerCommission": 550, // COIN-Ⓜ futures commission (after adjusted) for taker -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCommissionAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCommissionAsync.txt deleted file mode 100644 index 1d0d4dc6a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountCommissionAsync.txt +++ /dev/null @@ -1,7 +0,0 @@ -{ - "subAccountId": "1", - "makerCommission": 15, - "takerCommission": 15, - "marginMakerCommission": 15, - "marginTakerCommission": 15 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountFuturesCommissionAdjustmentAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountFuturesCommissionAdjustmentAsync.txt deleted file mode 100644 index 96dcff8cb..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/ChangeSubAccountFuturesCommissionAdjustmentAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "subAccountId": 1, - "symbol": "BTCUSDT", - "makerAdjustment": 150, // USDT-Ⓜ futures commission adjustment for maker - "takerAdjustment": 150, // USDT-Ⓜ futures commission adjustment for taker - "makerCommission": 450, // USDT-Ⓜ futures commission (after adjusted) for maker - "takerCommission": 550, // USDT-Ⓜ futures commission (after adjusted) for taker -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateApiKeyForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateApiKeyForSubAccountAsync.txt deleted file mode 100644 index 92874bddd..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateApiKeyForSubAccountAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "subaccountId": "1", - "apiKey":"vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", - "secretKey":"NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0", - "canTrade": true, - "marginTrade": false, - "futuresTrade": false -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateSubAccountAsync.txt deleted file mode 100644 index 911ddbf43..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/CreateSubAccountAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subaccountId": "1", - "email": "vai_42038996_47411276_brokersubuser@lac.info", - "tag":"bob123d" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteIpRestrictionForSubAccountApiKeyAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteIpRestrictionForSubAccountApiKeyAsync.txt deleted file mode 100644 index 24dbce9d1..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteIpRestrictionForSubAccountApiKeyAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "subaccountId": "1", - "apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", - "ipList": [ - "54.128.193.28", - ], - "updateTime": 1544433328000 - } \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteSubAccountApiKeyAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteSubAccountApiKeyAsync.txt deleted file mode 100644 index 9e26dfeeb..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/DeleteSubAccountApiKeyAsync.txt +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableFuturesForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableFuturesForSubAccountAsync.txt deleted file mode 100644 index 9a78fe74c..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableFuturesForSubAccountAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subaccountId": "1", - "enableFutures": true, - "updateTime": 1570801523523 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableLeverageTokenForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableLeverageTokenForSubAccountAsync.txt deleted file mode 100644 index 094d3f6e0..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableLeverageTokenForSubAccountAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "subAccountId": 1, - "enableBlvt": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableMarginForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableMarginForSubAccountAsync.txt deleted file mode 100644 index 6212a8a55..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/EnableMarginForSubAccountAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subaccountId": "1", - "enableMargin": true, - "updateTime": 1570801523523 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBnbBurnStatusForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBnbBurnStatusForSubAccountAsync.txt deleted file mode 100644 index c187120e6..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBnbBurnStatusForSubAccountAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subAccountId": 1, - "spotBNBBurn": true, - "interestBNBBurn": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerAccountInfoAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerAccountInfoAsync.txt deleted file mode 100644 index 9599e9ac8..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerAccountInfoAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "maxMakerCommission":20, - "minMakerCommission":5, - "maxTakerCommission":20, - "minTakerCommission":5, - "subAccountQty":400, - "maxSubAccountQty":1000 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerCommissionRebatesRecentAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerCommissionRebatesRecentAsync.txt deleted file mode 100644 index dfccfb04e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerCommissionRebatesRecentAsync.txt +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "subaccountId":"1", - "income": "0.02063898", - "asset":"BTC", - "symbol": "ETHBTC", - "tradeId": 123456, - "time":1544433328000 - }, - { - "subaccountId":"2", - "income": "1.2063898", - "asset":"USDT", - "symbol": "BTCUSDT", - "tradeId": 223456, - "time":1581580800000 - } - -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerFuturesCommissionRebatesHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerFuturesCommissionRebatesHistoryAsync.txt deleted file mode 100644 index 9ea4d1260..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetBrokerFuturesCommissionRebatesHistoryAsync.txt +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "subaccountId": "1", - "income": "0.02063898", - "asset": "USDT", - "symbol": "ETHUSDT", - "tradeId": 123456, - "time": 1544433328000 - }, - { - "subaccountId": "2", - "income": "0.02060008", - "asset": "USDT", - "symbol": "BTCUSDT", - "tradeId": 223456, - "time": 1544433328000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetIpRestrictionForSubAccountApiKeyAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetIpRestrictionForSubAccountApiKeyAsync.txt deleted file mode 100644 index 469c17357..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetIpRestrictionForSubAccountApiKeyAsync.txt +++ /dev/null @@ -1,10 +0,0 @@ -{ - "subaccountId": "1", - "ipRestrict": true, - "apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", - "ipList": [ - "54.128.193.23", - "542.234.192.290" - ], - "updateTime": 1544433328000 - } \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountApiKeyAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountApiKeyAsync.txt deleted file mode 100644 index cb32c9142..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountApiKeyAsync.txt +++ /dev/null @@ -1,7 +0,0 @@ -{ - "subaccountId": "1", - "apiKey":"vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", - "canTrade": true, - "marginTrade": true, - "futuresTrade": false -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountCoinFuturesCommissionAdjustmentAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountCoinFuturesCommissionAdjustmentAsync.txt deleted file mode 100644 index 84d8d0c5c..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountCoinFuturesCommissionAdjustmentAsync.txt +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "subAccountId": 1, - "pair": "BTCUSD", - "makerAdjustment": 150, // COIN-Ⓜ futures commission adjustment for maker - "takerAdjustment": 150, // COIN-Ⓜ futures commission adjustment for taker - "makerCommission": 450, // COIN-Ⓜ futures commission (after adjusted) for maker - "takerCommission": 550, // COIN-Ⓜ futures commission (after adjusted) for taker - }, - { - "subAccountId": 1, - "pair": "ETHUSD", - "makerAdjustment": 100, - "takerAdjustment": 100, - "makerCommission": 400, - "takerCommission": 500, - }, -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountDepositHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountDepositHistoryAsync.txt deleted file mode 100644 index ea9b4f598..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountDepositHistoryAsync.txt +++ /dev/null @@ -1,34 +0,0 @@ -[ - - { - - "subaccountId": "1", - "address": "0xddc66e4313fd6c737b6cae67cad90bb4e0ac7092", - "addressTag": "", - "amount": "139.04370000", - "coin": "USDT", - "insertTime": 1566791463000, - "network": "ETH", - "status": 1, - "txId": "0x5759dfe9983a4c7619bce9bc736bb6c26f804091753bf66fa91e7cd5cfeebafd", - "sourceAddress":"xxxxxxxxxxxxxx", - "confirmTimes":"12/12" - - }, - - { - - "subaccountId": "2", - "address": "0xddc66e4313fd6c737b6cae67kld90bb4e0ac7092", - "addressTag": "", - "amount": "1589.12345678", - "coin": "BTC", - "insertTime": 1566791463000, - "network": "BNB", - "status": 1, - "txId": "0x5759dfe9983a4c7619bsdltixngbb6c26f804091753bf66fa91e7cd5cfeebafd", - "sourceAddress":"xxxxxxxxxxxxxx", - "confirmTimes":"12/12" - } - -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesAssetInfoAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesAssetInfoAsync.txt deleted file mode 100644 index 5412f1463..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesAssetInfoAsync.txt +++ /dev/null @@ -1,25 +0,0 @@ -{ - - data:[ - - { - "futuresEnable": true, // if enable futures - "subAccountId": "367537027503425913", - "totalInitialMarginOfUsdt": "0.03558521", // initial margin - "totalMaintenanceMarginOfUsdt": "0.02695000", // maintenance margin - "totalWalletBalanceOfUsdt": "8.23222312", // wallet balance - "totalUnrealizedProfitOfUsdt": "-0.78628370", // unrealized profit - "totalMarginBalanceOfUsdt": "8.23432343", // margin balance - "totalPositionInitialMarginOfUsdt": "0.33683000", // position initial margin - "totalOpenOrderInitialMarginOfUsdt": "0.00000000" // open order initial margin - - }, - { - "futuresEnable": false, - "subAccountId": "36753702750323432" - } - - ], - "timestamp": 1583127900000 - -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesCommissionAdjustmentAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesCommissionAdjustmentAsync.txt deleted file mode 100644 index b7fa550b3..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountFuturesCommissionAdjustmentAsync.txt +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "subAccountId": 1, - "symbol": "BTCUSDT", - "makerAdjustment": 150, // USDT-Ⓜ futures commission adjustment for maker - "takerAdjustment": 150, // USDT-Ⓜ futures commission adjustment for taker - "makerCommission": 450, // USDT-Ⓜ futures commission (after adjusted) for maker - "takerCommission": 550, // USDT-Ⓜ futures commission (after adjusted) for taker - }, - { - "subAccountId": 1, - "symbol": "ETHUSDT", - "makerAdjustment": 100, - "takerAdjustment": 100, - "makerCommission": 400, - "takerCommission": 500, - }, -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountMarginAssetInfoAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountMarginAssetInfoAsync.txt deleted file mode 100644 index a43882e8c..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountMarginAssetInfoAsync.txt +++ /dev/null @@ -1,21 +0,0 @@ -{ - - data:[ - - { - "marginEnable": true, //if enable margin - "subAccountId": "367537027503425913", - "totalAssetOfBtc": "0.03558520", // margin asset - "totalLiabilityOfBtc": "0.34585210", //liability - "totalNetAssetOfBtc" :"0.23334213", // net asset - "marginLevel": "0.009" // margin level - }, - { - "marginEnable": false, - "subAccountId": "367537027503435242" - } - - ], - "timestamp": 1583127900000 - -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountSpotAssetInfoAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountSpotAssetInfoAsync.txt deleted file mode 100644 index b4c6c8a80..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountSpotAssetInfoAsync.txt +++ /dev/null @@ -1,17 +0,0 @@ -{ - - data:[ - - { - "subAccountId": "367537027503425913", - "totalBalanceOfBtc": "0.0355852154360000" //spot asset - }, - { - "subAccountId": "367537027503421232", - "totalBalanceOfBtc": "0.0233852154360000" - } - - ], - "timestamp": 1583432900000 - -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountsAsync.txt deleted file mode 100644 index 5fe0808e8..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetSubAccountsAsync.txt +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "subaccountId": "1", - "email": "vai_42038996_47411276_brokersubuser@lac.info", - "tag":"bob123", - "makerCommission": 10, - "takerCommission": 10, - "marginMakerCommission": -1, // if margin disabled, return -1 - "marginTakerCommission": -1, // if margin disabled, return -1 - "createTime":1544433328000 - }, - { - "subaccountId": "2", - "email":"123@abc.com", - "tag":"bob123", - "makerCommission":10, - "takerCommission":10, - "marginMakerCommission": 10, - "marginTakerCommission": 10, - "createTime":1544433328000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferFuturesHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferFuturesHistoryAsync.txt deleted file mode 100644 index 5fda18cc7..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferFuturesHistoryAsync.txt +++ /dev/null @@ -1,25 +0,0 @@ -{ - "success": true, - "futuresType": 2, - "transfer":[ - { - "fromId":"", // master account - "toId":"2", - "asset":"BTC", - "qty":"1", - "tranId": "12137888538", - "clientTranId":"a123", - "time":1544433328000 - }, - { - "fromId":"1", - "toId":"2", - "asset":"ETH", - "qty":"2", - "tranId": "12137888538", - "clientTranId":"", - "time":1544433328000, - - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryAsync.txt deleted file mode 100644 index da3542ec1..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryAsync.txt +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "fromId":"1", - "toId":"2", - "asset":"BTC", - "qty":"1", - "time":1544433328000, - "txnId":"2966662589", - "clientTranId":"abc", - "status": "SUCCESS" // Status Type:INIT,PROCESS,SUCCESS - }, - { - "fromId":"1", - "toId":"2", - "asset":"ETH", - "qty":"2", - "time":1544433328000, - "txnId":"296666999", - "clientTranId":"", - "status": "SUCCESS" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryUniversalAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryUniversalAsync.txt deleted file mode 100644 index a96fc42a6..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/GetTransferHistoryUniversalAsync.txt +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "toId":"444016824578949121", - "asset":"BTC", - "qty":"0.1", - "time":1544433328000, - "status":"SUCCESS", - "txnId":"12831078279", - "clientTranId":"abc", - "fromAccountType": "SPOT", - "toAccountType": "USDT_FUTURE" - }, - { - "toId":"444016824578949121", - "asset":"USDT", - "qty":"2", - "time":1544433328000, - "status":"SUCCESS", - "txnId":"296666999", - "clientTranId":"", - "fromAccountType": "SPOT", - "toAccountType": "USDT_FUTURE" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferAsync.txt deleted file mode 100644 index 6bb061e72..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "txnId":"2966662589", - "clientTranId":"abc" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferFuturesAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferFuturesAsync.txt deleted file mode 100644 index 6fd305ea7..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferFuturesAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "success":true, - "txnId":"2966662589", - "clientTranId":"a123" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferUniversalAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferUniversalAsync.txt deleted file mode 100644 index 2ad9cf8b2..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Brokerage/TransferUniversalAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "txnId":12831061179, - "clientTranId":"abc" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/AdjustCrossCollateralLoanToValueAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/AdjustCrossCollateralLoanToValueAsync.txt deleted file mode 100644 index eefc198bc..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/AdjustCrossCollateralLoanToValueAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - "collateralCoin": "BUSD", - "direction": "ADDITIONAL", - "amount": "5.00000000", - "time": 1583540328433 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/BorrowForCrossCollateralAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/BorrowForCrossCollateralAsync.txt deleted file mode 100644 index c48931cc7..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/BorrowForCrossCollateralAsync.txt +++ /dev/null @@ -1,8 +0,0 @@ -{ - "coin": "USDT", - "amount": "4.50000000", - "collateralCoin": "BUSD", - "collateralAmount": "5.00000000", - "time": 1582540328433, - "borrowId": "438648398970089472" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetAdjustCrossCollateralLoanToValueHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetAdjustCrossCollateralLoanToValueHistoryAsync.txt deleted file mode 100644 index 637c00686..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetAdjustCrossCollateralLoanToValueHistoryAsync.txt +++ /dev/null @@ -1,15 +0,0 @@ -{ - "rows":[ - { - "amount": ".17398184", - "collateralCoin": "BUSD", - "coin": "USDT", - "preCollateralRate":"0.87054861", - "afterCollateralRate":"0.89736451", - "direction": "REDUCED", - "status": "COMPLETED", - "adjustTime": 1583978243588 - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralBorrowHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralBorrowHistoryAsync.txt deleted file mode 100644 index 841488e58..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralBorrowHistoryAsync.txt +++ /dev/null @@ -1,17 +0,0 @@ -{ - "rows":[ - { - "confirmedTime": 1582540328433, - "coin": "USDT", - "collateralRate": "0.89991001", // collateralLevel - "leftTotal": "4.5", - "leftPrincipal": "4.5", - "deadline": 4736102399000, - "collateralCoin": "BUSD", - "collateralAmount": "5.0", - "orderStatus": "PENDING", - "borrowId": "438648398970089472" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralInformationAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralInformationAsync.txt deleted file mode 100644 index a90afe578..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralInformationAsync.txt +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "loanCoin": "BUSD", - "collateralCoin": "BTC", - "rate": "0.9", - "marginCallCollateralRate": "0.95", - "liquidationCollateralRate": "0.98", - "currentCollateralRate": "0.87168984", - "interestRate": "0.0", // New for interest collection - "interestGracePeriod": "0" //Days, new for interest collection - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralLiquidationHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralLiquidationHistoryAsync.txt deleted file mode 100644 index bc6387f6a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralLiquidationHistoryAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rows":[ - { - "collateralAmountForLiquidation":"10.12345678", - "collateralCoin": "BUSD", - "forceLiquidationStartTime": 1583978243588, - "coin": "USDT", - "restCollateralAmountAfterLiquidation": "15.12345678", - "restLoanAmount": "11.12345678", - "status": "PENDING" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralRepayHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralRepayHistoryAsync.txt deleted file mode 100644 index c84265bd4..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralRepayHistoryAsync.txt +++ /dev/null @@ -1,18 +0,0 @@ -{ - "rows":[ - { - "coin": "USDT", - "amount": "1.68", - "collateralCoin": "BUSD", - "repayType": "NORMAL", // "COLLATERAL" for collateral repayment - "releasedCollateral": "1.80288889", - "price": "1.001", // Loan/collateral exchange rate - "repayCollateral": "10010", // Only for collateral repayment - "confirmedTime": 1582781327575, - "updateTime": 1582794387516, // time - "status": "PENDING", - "repayId": "439659223998894080" - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralWalletAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralWalletAsync.txt deleted file mode 100644 index 2cfec491d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetCrossCollateralWalletAsync.txt +++ /dev/null @@ -1,27 +0,0 @@ -{ - "totalCrossCollateral":"5.8238577133", - "totalBorrowed":"5.07000000", - "totalInterest":"0.0", // New for interest collection - "interestFreeLimit": "100000", // New for interest free limit - "asset": "USDT", - "crossCollaterals":[ - { - "collateralCoin":"BUSD", - "locked":"5.82211108", - "loanAmount": "5.07", - "currentCollateralRate": "0.87168984", // collateralLevel - "interestFreeLimitUsed": "5.07", // New for interest free limit - "principalForInterest": "0.0", // New for interest collection - "interest": "0.0" // New for interest collection - }, - { - "collateralCoin":"BTC", - "locked":"0", - "loanAmount": "0", - "currentCollateralRate": "0", // collateralLevel - "interestFreeLimitUsed": "0", // New for interest free limit - "principalForInterest": "0.0", // New for interest collection - "interest": "0.0" // New for interest collection - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetFuturesTransferHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetFuturesTransferHistoryAsync.txt deleted file mode 100644 index afefe04a4..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetFuturesTransferHistoryAsync.txt +++ /dev/null @@ -1,13 +0,0 @@ -{ - "rows": [ - { - "asset": "USDT", - "tranId": 100000001, - "amount": "40.84624400", - "type": "1", // one of 1( from spot to USDT-Ⓜ), 2( from USDT-Ⓜ to spot), 3( from spot to COIN-Ⓜ), and 4( from COIN-Ⓜ to spot) - "timestamp": 1555056425000, - "status": "CONFIRMED" //one of PENDING (pending to execution), CONFIRMED (successfully transfered), FAILED (execution failed, nothing happened to your account); - } - ], - "total": 1 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetMaxAmountForAdjustCrossCollateralLoanToValueAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetMaxAmountForAdjustCrossCollateralLoanToValueAsync.txt deleted file mode 100644 index 3a8db0efa..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetMaxAmountForAdjustCrossCollateralLoanToValueAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "maxInAmount": "9.97109038", - "maxOutAmount": "0.50952693" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetRateAfterAdjustLoanToValueAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetRateAfterAdjustLoanToValueAsync.txt deleted file mode 100644 index 1a864d0f5..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/GetRateAfterAdjustLoanToValueAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "afterCollateralRate":"0.89736451" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/RepayForCrossCollateralAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/RepayForCrossCollateralAsync.txt deleted file mode 100644 index 1e8a88c5d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/RepayForCrossCollateralAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - "coin": "USDT", - "amount": "1.68", - "collateralCoin": "BUSD", - "repayId": "439659223998894080" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/TransferFuturesAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Futures/TransferFuturesAccountAsync.txt deleted file mode 100644 index 6fb26cb33..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Futures/TransferFuturesAccountAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tranId": 100000001 //transaction id -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/CancelHashrateResaleRequestAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/CancelHashrateResaleRequestAsync.txt deleted file mode 100644 index c7cc4aff5..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/CancelHashrateResaleRequestAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleDetailsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleDetailsAsync.txt deleted file mode 100644 index 574f0b2bb..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleDetailsAsync.txt +++ /dev/null @@ -1,28 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": { - "profitTransferDetails": [{ - "poolUsername": "test4001", // Transfer out of sub-account - - "toPoolUsername": "pop", // Transfer into subaccount - "algoName": "sha256", // Transfer algorithm - "hashRate": 200000000000, // Transferred Hashrate quantity - "day": 20201213, // Transfer date - "amount": 0.2256872, // Transferred income - "coinName": "BTC" // Coin Name - }, - { - "poolUsername": "test4001", - "toPoolUsername": "pop", - "algoName": "sha256", - "hashRate": 200000000000, - "day": 20201213, - "amount": 0.2256872, - "coinName": "BTC" - } - ], - "totalNum": 8, - "pageSize": 200 - } -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleListAsync.txt deleted file mode 100644 index cf9e9cc36..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetHashrateResaleListAsync.txt +++ /dev/null @@ -1,30 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": { - "configDetails": [ - { - "configId": 168, // Mining ID - "poolUsername": "123", //Transfer out of subaccount - "toPoolUsername": "user1", // Transfer into subaccount - "algoName": "Ethash", // Transfer algorithm - "hashRate": 5000000, // Transferred Hashrate quantity - "startDay": 20201210, // Start date - "endDay": 20210405, //End date - "status": 1 //Status:0 Processing,1:Cancelled,2:Terminated - }, - { - "configId": 166, - "poolUsername": "pop", - "toPoolUsername": "111111", - "algoName": "Ethash", - "hashRate": 3320000, - "startDay": 20201226, - "endDay": 20201227, - "status": 0 - } - ], - "totalNum": 21, - "pageSize": 200 - } -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerDetailsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerDetailsAsync.txt deleted file mode 100644 index 84a065d4e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerDetailsAsync.txt +++ /dev/null @@ -1,38 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": [ - { - "workerName": "bhdc1.16A10404B", //Mining Account name - "type": "H_hashrate", // Type of hourly hashrate - "hashrateDatas": [ - { - "time": 1587902400000, // Time - "hashrate": "0", // Hashrate - "reject": 0 //Rejection Rate - }, - { - "time": 1587906000000, - "hashrate": "0", - "reject": 0 - } - ] - }, - { - "workerName": "bhdc1.16A10404B", //Mining Account name - "type": "D_hashrate", //Type of daily hashrate - "hashrateDatas": [ - { - "time": 1587902400000, // Time - "hashrate": "0", // Hashrate - "reject": 0 //Rejection Rate - }, - { - "time": 1587906000000, - "hashrate": "0", - "reject": 0 - } - ] - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerListAsync.txt deleted file mode 100644 index 58d637568..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMinerListAsync.txt +++ /dev/null @@ -1,28 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": { - "workerDatas": [ - { - "workerId": "1420554439452400131", //Miner ID - "workerName": "2X73", //Miner's name - "status": 3, // Status:1 valid, 2 invalid, 3 no longer valid - "hashRate": 0, // Real-time rate - "dayHashRate": 0, //24H Hashrate - "rejectRate": 0, //Real-time Rejection Rate - "lastShareTime": 1587712919000 // Last submission time - }, - { - "workerId": "7893926126382807951", - "workerName": "AZDC1.1A10101", - "status": 2, - "hashRate": 29711247541680, - "dayHashRate": 12697781298013.66, - "rejectRate": 0, - "lastShareTime": 1587969727000 - } - ], - "totalNum": 18530, // Total amount - "pageSize": 20 // Rows per page - } -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAccountListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAccountListAsync.txt deleted file mode 100644 index 16388814a..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAccountListAsync.txt +++ /dev/null @@ -1,38 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": [ - { - "type": "H_hashrate", //Type of hourly hashrate - "userName": "test", // Mining account - "list": [ - { - "time": 1585267200000, // Time - "hashrate": "0.00000000", // Hashrate - "reject": "0.00000000" //Rejection Rate - }, - { - "time": 1585353600000, - "hashrate": "0.00000000", - "reject": "0.00000000" - } - ] - }, - { - "type": "D_hashrate", //Type of daily hashrate - "userName": "test", // Mining account - "list": [ - { - "time": 1587906000000, // Time - "hashrate": "0.00000000", // Hashrate - "reject": "0.00000000" //Rejection Rate - }, - { - "time": 1587909600000, - "hashrate": "0.00000000", - "reject": "0.00000000" - } - ] - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAlgorithmListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAlgorithmListAsync.txt deleted file mode 100644 index 946431ab5..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningAlgorithmListAsync.txt +++ /dev/null @@ -1,12 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": [ - { - "algoName": "sha256", // Algorithm name - "algoId": 1, // Algorithm ID - "poolIndex": 0, // Sequence - "unit": "h/s" // Unit - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningCoinListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningCoinListAsync.txt deleted file mode 100644 index d87d1cb8d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningCoinListAsync.txt +++ /dev/null @@ -1,13 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": [ - { - "coinName": "BTC", // Currencyname - "coinId": 1, // id - "poolIndex": 0, // Sort - "algoId": 1, // Algorithm - "algoName": "sha256" //Name of algorithm - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningOtherRevenueListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningOtherRevenueListAsync.txt deleted file mode 100644 index a85539452..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningOtherRevenueListAsync.txt +++ /dev/null @@ -1,17 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": { - "otherProfits": [ - { - "time": 1607443200000, // Mining date - "coinName": "BTC", // Coin Name - "type": 4, // 1: Merged Mining, 2: Activity Bonus, 3:Rebate 4:Smart Pool 6:Income Transfer 7:Pool Savings - "profitAmount": 0.0011859, //Amount - "status": 2 //Status:0:Unpaid, 1:Paying 2:Paid - } - ], - "totalNum": 3, // Total Rows - "pageSize": 20 // Rows per page - } -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningRevenueListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningRevenueListAsync.txt deleted file mode 100644 index b308c5d04..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningRevenueListAsync.txt +++ /dev/null @@ -1,40 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": { - "accountProfits": [ - { - "time": 1586188800000, // Mining date - "type": 31, // 0:Mining Wallet,5:Mining Address,7:Pool Savings,8:Transferred,31:Income Transfer ,32:Hashrate Resale-Mining Wallet 33:Hashrate Resale-Pool Savings - "hashTransfer": null, // Transferred Hashrate - "transferAmount": null, // Transferred Income - "dayHashRate": 129129903378244, // Daily Hashrate - "profitAmount": 8.6083060304, //Earnings Amount - "coinName":"BTC", // Coin Type - "status": 2 //Status:0:Unpaid, 1:Paying 2:Paid - }, - { - "time": 1607529600000, - "coinName": "BTC", - "type": 0, - "dayHashRate": 9942053925926, - "profitAmount": 0.85426469, - "hashTransfer": 200000000000, - "transferAmount": 0.02180958, - "status": 2 - }, - { - "time": 1607443200000, - "coinName": "BTC", - "type": 31, - "dayHashRate": 200000000000, - "profitAmount": 0.02905916, - "hashTransfer": null, - "transferAmount": null, - "status": 2 - } - ], - "totalNum": 3, // Total Rows - "pageSize": 20 // Rows per page - } -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningStatisticsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningStatisticsAsync.txt deleted file mode 100644 index c0e90d393..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/GetMiningStatisticsAsync.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": { - "fifteenMinHashRate": "457835490067496409.00000000", // 15 mins hashrate - "dayHashRate": "214289268068874127.65000000", // 24H Hashrate - "validNum": 0, // Effective quantity - "invalidNum": 17562, // Invalid quantity - "profitToday":{ // Today's estimate - "BTC":"0.00314332", - "BSV":"56.17055953", - "BCH":"106.61586001" - }, - "profitYesterday":{ // Yesterday's earnings - "BTC":"0.00314332", - "BSV":"56.17055953", - "BCH":"106.61586001" - }, - - "userName": "test", // Mining account - "unit": "h/s", // Hashrate unit - "algo": "sha256" // Algorithm - } -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/PlaceHashrateResaleRequestAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Mining/PlaceHashrateResaleRequestAsync.txt deleted file mode 100644 index cae2c0285..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Mining/PlaceHashrateResaleRequestAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "code": 0, - "msg": "", - "data": 171 // Mining Account -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/ChangeToDailyPositionAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/ChangeToDailyPositionAsync.txt deleted file mode 100644 index 98828e035..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/ChangeToDailyPositionAsync.txt +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dailyPurchaseId": 862290, - "success": true, - "time": 1577233578000 -} diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCryptoLoansIncomeHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCryptoLoansIncomeHistoryAsync.txt deleted file mode 100644 index 77b528c04..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCryptoLoansIncomeHistoryAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "asset": "BUSD", - "type": "borrowIn", - "amount": "100", - "timestamp": 1633771139847, - "tranId": "80423589583" - }, - { - "asset": "BUSD", - "type": "borrowIn", - "amount": "100", - "timestamp": 1634638371496, - "tranId": "81685123491" - } - ] diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCustomizedFixedProjectPositionsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCustomizedFixedProjectPositionsAsync.txt deleted file mode 100644 index ecb859468..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetCustomizedFixedProjectPositionsAsync.txt +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "asset": "USDT", - "canTransfer": true, - "createTimestamp": 1587010770000, - "duration": 14, - "endTime": 1588291200000, - "interest": "0.19950000", - "interestRate": "0.05201250", - "lot": 1, - "positionId": 51724, - "principal": "100.00000000", - "projectId": "CUSDT14DAYSS001", - "projectName": "USDT", - "purchaseTime": 1587010771000, - "redeemDate": "2020-05-01", - "startTime": 1587081600000, - "status": "HOLDING", - "type": "CUSTOMIZED_FIXED" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFixedAndCustomizedFixedProjectListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFixedAndCustomizedFixedProjectListAsync.txt deleted file mode 100644 index 9d4f8525b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFixedAndCustomizedFixedProjectListAsync.txt +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "asset": "USDT", - "displayPriority": 1, - "duration": 90, - "interestPerLot": "1.35810000", - "interestRate": "0.05510000", - "lotSize": "100.00000000", - "lotsLowLimit": 1, - "lotsPurchased": 74155, - "lotsUpLimit": 80000, - "maxLotsPerUser": 2000, - "needKyc": false, - "projectId": "CUSDT90DAYSS001", - "projectName": "USDT", - "status": "PURCHASING", - "type": "CUSTOMIZED_FIXED", - "withAreaLimitation": false - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductListAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductListAsync.txt deleted file mode 100644 index 23d733211..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductListAsync.txt +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "asset": "BTC", - "avgAnnualInterestRate": "0.00250025", - "canPurchase": true, - "canRedeem": true, - "dailyInterestPerThousand": "0.00685000", - "featured": true, - "minPurchaseAmount": "0.01000000", - "productId": "BTC001", - "purchasedAmount": "16.32467016", - "status": "PURCHASING", - "upLimit": "200.00000000", - "upLimitPerUser": "5.00000000" - }, - { - "asset": "BUSD", - "avgAnnualInterestRate": "0.01228590", - "canPurchase": true, - "canRedeem": true, - "dailyInterestPerThousand": "0.03836000", - "featured": true, - "minPurchaseAmount": "0.10000000", - "productId": "BUSD001", - "purchasedAmount": "10.38932339", - "status": "PURCHASING", - "upLimit": "100000.00000000", - "upLimitPerUser": "50000.00000000" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductPositionAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductPositionAsync.txt deleted file mode 100644 index 90f959c6e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetFlexibleProductPositionAsync.txt +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "annualInterestRate": "0.02600000", - "asset": "USDT", - "avgAnnualInterestRate": "0.02599895", - "canRedeem": true, - "dailyInterestRate": "0.00007123", - "freeAmount": "75.46000000", - "freezeAmount": "0.00000000", // abandoned - "lockedAmount": "0.00000000", // abandoned - "productId": "USDT001", - "productName": "USDT", - "redeemingAmount": "0.00000000", - "todayPurchasedAmount": "0.00000000", - "totalAmount": "75.46000000", - "totalInterest": "0.22759183" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyPurchaseQuotaOfFlexableProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyPurchaseQuotaOfFlexableProductAsync.txt deleted file mode 100644 index ff2fd1973..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyPurchaseQuotaOfFlexableProductAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "asset": "BUSD", - "leftQuota": "50000.00000000" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyRedemptionQuotaOfFlexibleProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyRedemptionQuotaOfFlexibleProductAsync.txt deleted file mode 100644 index aa331dba5..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLeftDailyRedemptionQuotaOfFlexibleProductAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - "asset": "USDT", - "dailyQuota": "10000000.00000000", - "leftQuota": "0.00000000", - "minRedemptionAmount": "0.10000000" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingAccountAsync.txt deleted file mode 100644 index e954019bd..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingAccountAsync.txt +++ /dev/null @@ -1,22 +0,0 @@ -{ - "positionAmountVos": [ - { - "amount": "75.46000000", - "amountInBTC": "0.01044819", - "amountInUSDT": "75.46000000", - "asset": "USDT" - }, - { - "amount": "1.67072036", - "amountInBTC": "0.00023163", - "amountInUSDT": "1.67289230", - "asset": "BUSD" - } - ], - "totalAmountInBTC": "0.01067982", - "totalAmountInUSDT": "77.13289230", - "totalFixedAmountInBTC": "0.00000000", - "totalFixedAmountInUSDT": "0.00000000", - "totalFlexibleInBTC": "0.01067982", - "totalFlexibleInUSDT": "77.13289230" - } \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingInterestHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingInterestHistoryAsync.txt deleted file mode 100644 index 4a8f0755b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetLendingInterestHistoryAsync.txt +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "asset": "BUSD", - "interest": "0.00006408", - "lendingType": "DAILY", - "productName": "BUSD", - "time": 1577233578000 - }, - { - "asset": "USDT", - "interest": "0.00687654", - "lendingType": "DAILY", - "productName": "USDT", - "time": 1577233562000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetPurchaseRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetPurchaseRecordsAsync.txt deleted file mode 100644 index c6b21f3ed..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetPurchaseRecordsAsync.txt +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "amount": "100.00000000", - "asset": "USDT", - "createTime": 1575018453000, - "lendingType": "ACTIVITY", - "lot": 1, - "productName": "【Special】USDT 7D (8%)", - "purchaseId": 36857, - "status": "SUCCESS" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetRedemptionRecordsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetRedemptionRecordsAsync.txt deleted file mode 100644 index d5f08e9c6..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/GetRedemptionRecordsAsync.txt +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "amount": "0.07070000", - "asset": "USDT", - "createTime": 1566200161000, - "interest": "0.00070000", - "principal": "0.07000000", - "projectId": "test06", - "projectName": "USDT 1 day (10% anniualized)", - "startTime": 1566198000000, - "status": "PAID" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseCustomizedFixedProjectAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseCustomizedFixedProjectAsync.txt deleted file mode 100644 index 1134fed71..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseCustomizedFixedProjectAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "purchaseId": "18356" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseFlexibleProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseFlexibleProductAsync.txt deleted file mode 100644 index cf9ad8192..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/PurchaseFlexibleProductAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "purchaseId": 40607 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/RedeemFlexibleProductAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/Savings/RedeemFlexibleProductAsync.txt deleted file mode 100644 index 9e26dfeeb..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/Savings/RedeemFlexibleProductAsync.txt +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/CreateVirtualSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/CreateVirtualSubAccountAsync.txt deleted file mode 100644 index 1a7da6a0b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/CreateVirtualSubAccountAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "email":"addsdd_virtual@aasaixwqnoemail.com" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableBlvtForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableBlvtForSubAccountAsync.txt deleted file mode 100644 index 628d9a23d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableBlvtForSubAccountAsync.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - "email":"123@test.com", - "enableBlvt":true -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableFuturesForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableFuturesForSubAccountAsync.txt deleted file mode 100644 index 1f644c5ea..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableFuturesForSubAccountAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - - "email":"123@test.com", - "isFuturesEnabled": true // true or false - -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableMarginForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableMarginForSubAccountAsync.txt deleted file mode 100644 index 93e023711..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/EnableMarginForSubAccountAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - - "email":"123@test.com", - "isMarginEnabled": true - -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetFuturesAssetTransferHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetFuturesAssetTransferHistoryAsync.txt deleted file mode 100644 index 947e1a0e6..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetFuturesAssetTransferHistoryAsync.txt +++ /dev/null @@ -1,22 +0,0 @@ -{ - "success":true, - "futuresType": 2, - "transfers":[ - { - "from":"aaa@test.com", - "to":"bbb@test.com", - "asset":"BTC", - "qty":"1", - "tranId":11897001102, - "time":1544433328000 - }, - { - "from":"bbb@test.com", - "to":"ccc@test.com", - "asset":"ETH", - "qty":"2", - "tranId":11631474902, - "time":1544433328000 - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountAssetsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountAssetsAsync.txt deleted file mode 100644 index fa6261578..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountAssetsAsync.txt +++ /dev/null @@ -1,29 +0,0 @@ -{ - "balances":[ - { - "asset":"ADA", - "free":10000, - "locked":0 - }, - { - "asset":"BNB", - "free":10003, - "locked":0 - }, - { - "asset":"BTC", - "free":11467.6399, - "locked":0 - }, - { - "asset":"ETH", - "free":10004.995, - "locked":0 - }, - { - "asset":"USDT", - "free":11652.14213, - "locked":0 - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountBtcValuesAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountBtcValuesAsync.txt deleted file mode 100644 index 09ac1edef..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountBtcValuesAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "totalCount":2, - "masterAccountTotalAsset": "0.23231201", - "spotSubUserAssetBtcVoList":[ - { - "email":"sub123@test.com", - "totalAsset":"9999.00000000" - }, - { - "email":"test456@test.com", - "totalAsset":"0.00000000" - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositAddressAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositAddressAsync.txt deleted file mode 100644 index 53d9e87e6..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositAddressAsync.txt +++ /dev/null @@ -1,6 +0,0 @@ -{ - "address":"TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV", - "coin":"USDT", - "tag":"", - "url":"https://tronscan.org/#/address/TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositHistoryAsync.txt deleted file mode 100644 index 8de049c5e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountDepositHistoryAsync.txt +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "amount":"0.00999800", - "coin":"PAXG", - "network":"ETH", - "status":1, - "address":"0x788cabe9236ce061e5a892e1a59395a81fc8d62c", - "addressTag":"", - "txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3", - "insertTime":1599621997000, - "transferType":0, - "confirmTimes":"12/12" - }, - { - "amount":"0.50000000", - "coin":"IOTA", - "network":"IOTA", - "status":1, - "address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW", - "addressTag":"", - "txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999", - "insertTime":1599620082000, - "transferType":0, - "confirmTimes":"1/1" - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountMarginDetailsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountMarginDetailsAsync.txt deleted file mode 100644 index 3c86a502e..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountMarginDetailsAsync.txt +++ /dev/null @@ -1,47 +0,0 @@ -{ - "email":"123@test.com", - "marginLevel": "11.64405625", - "totalAssetOfBtc": "6.82728457", - "totalLiabilityOfBtc": "0.58633215", - "totalNetAssetOfBtc": "6.24095242", - "marginTradeCoeffVo": - { - "forceLiquidationBar": "1.10000000", // Liquidation margin ratio - "marginCallBar": "1.50000000", // Margin call margin ratio - "normalBar": "2.00000000" // Initial margin ratio - }, - "marginUserAssetVoList": [ - { - "asset": "BTC", - "borrowed": "0.00000000", - "free": "0.00499500", - "interest": "0.00000000", - "locked": "0.00000000", - "netAsset": "0.00499500" - }, - { - "asset": "BNB", - "borrowed": "201.66666672", - "free": "2346.50000000", - "interest": "0.00000000", - "locked": "0.00000000", - "netAsset": "2144.83333328" - }, - { - "asset": "ETH", - "borrowed": "0.00000000", - "free": "0.00000000", - "interest": "0.00000000", - "locked": "0.00000000", - "netAsset": "0.00000000" - }, - { - "asset": "USDT", - "borrowed": "0.00000000", - "free": "0.00000000", - "interest": "0.00000000", - "locked": "0.00000000", - "netAsset": "0.00000000" - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountStatusAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountStatusAsync.txt deleted file mode 100644 index 5da2cf7a7..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountStatusAsync.txt +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "email":"123@test.com", // user email - "isSubUserEnabled": true, // true or false - "isUserActive": true, // true or false - "insertTime": 1570791523523, // sub account create time - "isMarginEnabled": true, // true or false for margin - "isFutureEnabled": true, // true or false for futures. - "mobile": 1570791523523 // user mobile number - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForMasterAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForMasterAsync.txt deleted file mode 100644 index ff32096c6..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForMasterAsync.txt +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "from":"aaa@test.com", - "to":"bbb@test.com", - "asset":"BTC", - "qty":"10", - "status": "SUCCESS", - "tranId": 6489943656, - "time":1544433328000 - }, - { - "from":"bbb@test.com", - "to":"ccc@test.com", - "asset":"ETH", - "qty":"2", - "status": "SUCCESS", - "tranId": 6489938713, - "time":1544433328000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForSubAccountAsync.txt deleted file mode 100644 index 94ab6a03f..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountTransferHistoryForSubAccountAsync.txt +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "counterParty":"master", - "email":"master@test.com", - "type":1, // 1 for transfer in, 2 for transfer out - "asset":"BTC", - "qty":"1", - "fromAccountType":"SPOT", - "toAccountType":"SPOT", - "status":"SUCCESS", - "tranId":11798835829, - "time":1544433325000 - }, - { - "counterParty":"subAccount", - "email":"sub2@test.com", - "type":1, - "asset":"ETH", - "qty":"2", - "fromAccountType":"SPOT", - "toAccountType":"SPOT", - "status":"SUCCESS", - "tranId":11798829519, - "time":1544433326000 - } -] \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsAsync.txt deleted file mode 100644 index 45aec76cb..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsAsync.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "subAccounts":[ - { - "email":"testsub@gmail.com", - "isFreeze":false, - "createTime":1544433328000 - }, - { - "email":"virtual@oxebmvfonoemail.com", - "isFreeze":false, - "createTime":1544433328000 - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsFuturesSummaryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsFuturesSummaryAsync.txt deleted file mode 100644 index 651ba5d5d..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsFuturesSummaryAsync.txt +++ /dev/null @@ -1,34 +0,0 @@ -{ - "totalInitialMargin": "9.83137400", - "totalMaintenanceMargin": "0.41568700", - "totalMarginBalance": "23.03235621", - "totalOpenOrderInitialMargin": "9.00000000", - "totalPositionInitialMargin": "0.83137400", - "totalUnrealizedProfit": "0.03219710", - "totalWalletBalance": "22.15879444", - "asset": "USD", // The sum of BUSD and USDT - "subAccountList":[ - { - "email": "123@test.com", - "totalInitialMargin": "9.00000000", - "totalMaintenanceMargin": "0.00000000", - "totalMarginBalance": "22.12659734", - "totalOpenOrderInitialMargin": "9.00000000", - "totalPositionInitialMargin": "0.00000000", - "totalUnrealizedProfit": "0.00000000", - "totalWalletBalance": "22.12659734", - "asset": "USD" //The sum of BUSD and USDT - }, - { - "email": "345@test.com", - "totalInitialMargin": "0.83137400", - "totalMaintenanceMargin": "0.41568700", - "totalMarginBalance": "0.90575887", - "totalOpenOrderInitialMargin": "0.00000000", - "totalPositionInitialMargin": "0.83137400", - "totalUnrealizedProfit": "0.03219710", - "totalWalletBalance": "0.87356177", - "asset": "USD" - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsMarginSummaryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsMarginSummaryAsync.txt deleted file mode 100644 index 17d17e77f..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetSubAccountsMarginSummaryAsync.txt +++ /dev/null @@ -1,19 +0,0 @@ -{ - "totalAssetOfBtc": "4.33333333", - "totalLiabilityOfBtc": "2.11111112", - "totalNetAssetOfBtc": "2.22222221", - "subAccountList":[ - { - "email":"123@test.com", - "totalAssetOfBtc": "2.11111111", - "totalLiabilityOfBtc": "1.11111111", - "totalNetAssetOfBtc": "1.00000000" - }, - { - "email":"345@test.com", - "totalAssetOfBtc": "2.22222222", - "totalLiabilityOfBtc": "1.00000001", - "totalNetAssetOfBtc": "1.22222221" - } - ] -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetUniversalTransferHistoryAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetUniversalTransferHistoryAsync.txt deleted file mode 100644 index fe7337c19..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/GetUniversalTransferHistoryAsync.txt +++ /dev/null @@ -1,38 +0,0 @@ -{ - "result": [ - { - "tranId": 11945860693, - "fromEmail": "master@test.com", - "toEmail": "subaccount1@test.com", - "asset": "BTC", - "amount": "0.1", - "fromAccountType": "SPOT", - "toAccountType": "COIN_FUTURE", - "status": "SUCCESS", - "createTimeStamp": 1544433325000 - }, - { - "tranId": 11945857955, - "fromEmail": "master@test.com", - "toEmail": "subaccount2@test.com", - "asset": "ETH", - "amount": "0.2", - "fromAccountType": "SPOT", - "toAccountType": "USDT_FUTURE", - "status": "SUCCESS", - "createTimeStamp": 1544433326000 - }, - { - "tranId": 138579572899, - "fromEmail": "master@test.com", - "toEmail": "subaccount3@test.com", - "asset": "USDC", - "amount": "0.3", - "fromAccountType": "SPOT", - "toAccountType": "MARGIN", - "status": "SUCCESS", - "createTimeStamp": 1544433327000 - } - ], - "totalCount": 3 -} diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountAsync.txt deleted file mode 100644 index 76acb7dbf..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tranId":11945860693 -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountFuturesAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountFuturesAsync.txt deleted file mode 100644 index 9c931288b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountFuturesAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "txnId":"2966662589" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountMarginAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountMarginAsync.txt deleted file mode 100644 index 9c931288b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountMarginAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "txnId":"2966662589" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToMasterAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToMasterAsync.txt deleted file mode 100644 index 9c931288b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToMasterAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "txnId":"2966662589" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToSubAccountAsync.txt b/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToSubAccountAsync.txt deleted file mode 100644 index 9c931288b..000000000 --- a/Binance.Net.UnitTests/JsonResponses/Spot/SubAccount/TransferSubAccountToSubAccountAsync.txt +++ /dev/null @@ -1,3 +0,0 @@ -{ - "txnId":"2966662589" -} \ No newline at end of file diff --git a/Binance.Net.UnitTests/JsonSocketTests.cs b/Binance.Net.UnitTests/JsonSocketTests.cs deleted file mode 100644 index 22429bd59..000000000 --- a/Binance.Net.UnitTests/JsonSocketTests.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Binance.Net.Interfaces; -using Binance.Net.Interfaces.Clients; -using Binance.Net.Objects.Models; -using Binance.Net.Objects.Models.Futures.Socket; -using Binance.Net.Objects.Models.Spot.Socket; -using Binance.Net.UnitTests.TestImplementations; -using Newtonsoft.Json; -using NUnit.Framework; - -namespace Binance.Net.UnitTests -{ - internal class JsonSocketTests - { - [Test] - public async Task ValidateCoinFuturesKlineUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/KlineUpdate.txt", new List { "B" }); - } - - [Test] - public async Task ValidateCoinFuturesIndexPriceUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/IndexPriceUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesMarkPriceUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/MarkPriceUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesMiniTickerUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/MiniTickerUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesTickerUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/TickerUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesAggTradeUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/AggTradeUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesBookTickerUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/BookTickerUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesLiquidationOrderUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/LiquidationOrderUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesPartialBookUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/PartialBookUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesOrderBookUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/OrderBookUpdate.txt"); - } - - [Test] - public async Task ValidateCoinFuturesContractInfoUpdateStreamJson() - { - await TestFileToObject(@"JsonResponses/CoinFutures/Socket/ContractInfoUpdate.txt"); - } - - private static async Task TestFileToObject(string filePath, List ignoreProperties = null) - { - var listener = new EnumValueTraceListener(); - Trace.Listeners.Add(listener); - var path = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName; - string json; - try - { - var file = File.OpenRead(Path.Combine(path, filePath)); - using var reader = new StreamReader(file); - json = await reader.ReadToEndAsync(); - } - catch (FileNotFoundException) - { - throw; - } - - var result = JsonConvert.DeserializeObject(json); - JsonToObjectComparer.ProcessData("", result, json, ignoreProperties: new Dictionary> - { - { "", ignoreProperties ?? new List() } - }); - Trace.Listeners.Remove(listener); - } - } - - internal class EnumValueTraceListener : TraceListener - { - public override void Write(string message) - { - if (message.Contains("Cannot map")) - throw new Exception("Enum value error: " + message); - } - - public override void WriteLine(string message) - { - if (message.Contains("Cannot map")) - throw new Exception("Enum value error: " + message); - } - } -} diff --git a/Binance.Net.UnitTests/JsonTests.cs b/Binance.Net.UnitTests/JsonTests.cs deleted file mode 100644 index 861abf613..000000000 --- a/Binance.Net.UnitTests/JsonTests.cs +++ /dev/null @@ -1,190 +0,0 @@ -using Binance.Net.Objects; -using Binance.Net.UnitTests.TestImplementations; -using NUnit.Framework; -using System.Collections.Generic; -using System.Threading.Tasks; -using CryptoExchange.Net.Interfaces; -using Binance.Net.Interfaces.Clients; -using CryptoExchange.Net.Authentication; - -namespace Binance.Net.UnitTests -{ - [TestFixture] - public class JsonTests - { - private JsonToObjectComparer _comparer = new JsonToObjectComparer((json) => TestHelpers.CreateResponseClient(json, options => - { - options.ApiCredentials = new ApiCredentials("123", "123"); - options.RateLimiterEnabled = false; - options.SpotOptions.AutoTimestamp = false; - options.UsdFuturesOptions.AutoTimestamp = false; - options.CoinFuturesOptions.AutoTimestamp = false; - })); - - [Test] - public async Task ValidateSpotSubAccountCalls() - { - await _comparer.ProcessSubject( - "Spot/SubAccount", - c => c.GeneralApi.SubAccount, - - useNestedJsonPropertyForCompare: new Dictionary - { - { "GetSubAccountsAsync", "subAccounts" }, - { "GetSubAccountAssetsAsync", "balances" }, - { "GetUniversalTransferHistoryAsync", "result" }, - { "GetFuturesAssetTransferHistoryAsync", "transfers" }, - }); - } - - [Test] - public async Task ValidateSpotStakingCalls() - { - await _comparer.ProcessSubject( - "General/Staking", - c => c.GeneralApi.Staking); - } - - [Test] - public async Task ValidateSpotBrokerageCalls() - { - await _comparer.ProcessSubject( - "Spot/Brokerage", - c => c.GeneralApi.Brokerage); - } - - [Test] - public async Task ValidateSpotMiningCalls() - { - await _comparer.ProcessSubject( - "Spot/Mining", - c => c.GeneralApi.Mining, - useNestedJsonPropertyForCompare: new Dictionary - { - { "GetMiningCoinListAsync", "data" }, - { "GetMiningAlgorithmListAsync", "data" }, - { "GetMiningRevenueListAsync", "data" }, - { "GetMiningOtherRevenueListAsync", "data" }, - { "GetMiningStatisticsAsync", "data" }, - { "GetMiningAccountListAsync", "data" }, - { "GetHashrateResaleListAsync", "data" }, - { "GetHashrateResaleDetailsAsync", "data" }, - { "PlaceHashrateResaleRequestAsync", "data" }, - { "CancelHashrateResaleRequestAsync", "data" }, - { "GetMinerDetailsAsync", "data" }, - { "GetMinerListAsync", "data" }, - }); - } - - [Test] - public async Task ValidateSpotFuturesCalls() - { - await _comparer.ProcessSubject( - "Spot/Futures", - c => c.GeneralApi.Futures, - new [] { "collateralQuantity" }); - } - - [Test] - public async Task ValidateSimpleEarnCalls() - { - await _comparer.ProcessSubject( - "General/SimpleEarn", - c => c.GeneralApi.SimpleEarn); - } - - [Test] - public async Task ValidateCoinFuturesTradingCalls() - { - await _comparer.ProcessSubject( - "CoinFutures/Trading", - c => c.CoinFuturesApi.Trading, - useNestedJsonPropertyForCompare: new Dictionary - { - - }, - ignoreProperties: new Dictionary> - { - }, - parametersToSetNull: new string[] { }); - } - - [Test] - public async Task ValidateCoinFuturesAccountCalls() - { - await _comparer.ProcessSubject( - "CoinFutures/Account", - c => c.CoinFuturesApi.Account, - useNestedJsonPropertyForCompare: new Dictionary - { - - }, - ignoreProperties: new Dictionary> - { - { "GetPositionInformationAsync", new List{ "unRealizedProfit" } }, - { "GetBracketsAsync", new List { "pair", "qtyCap", "qtylFloor" } } - }, - parametersToSetNull: new string[] { }); - } - - [Test] - public async Task ValidateCoinFuturesExchangeDataCalls() - { - await _comparer.ProcessSubject( - "CoinFutures/ExchangeData", - c => c.CoinFuturesApi.ExchangeData, - useNestedJsonPropertyForCompare: new Dictionary - { - - }, - ignoreProperties: new Dictionary> - { - { "GetTopLongShortPositionRatioAsync", new List { "shortPosition", "longPosition" } }, - }, - parametersToSetNull: new string[] { - "limit" - }); - } - - [Test] - public async Task ValidateCryptoLoansCalls() - { - await _comparer.ProcessSubject( - "General/CryptoLoans", - c => c.GeneralApi.CryptoLoans, - new[] { "collateralQuantity" }); - } - - //[Test] - //public async Task ValidateBrokerageCalls() - //{ - // await _comparer.ProcessSubject( - // "Brokerage", - // c => c.Brokerage); - //} - - //[Test] - //public async Task ValidateLendingCalls() - //{ - // await _comparer.ProcessSubject( - // "Lending", - // c => c.Lending); - //} - - //[Test] - //public async Task ValidateBlvtCalls() - //{ - // await _comparer.ProcessSubject( - // "LeveragedTokens", - // c => c.Blvt); - //} - - //[Test] - //public async Task ValidateLiquidSwapCalls() - //{ - // await _comparer.ProcessSubject( - // "LiquidSwap", - // c => c.BSwap); - //} - } -} diff --git a/Binance.Net.UnitTests/RestIntergrationTest.cs b/Binance.Net.UnitTests/RestIntergrationTest.cs deleted file mode 100644 index 0807f58d4..000000000 --- a/Binance.Net.UnitTests/RestIntergrationTest.cs +++ /dev/null @@ -1,73 +0,0 @@ -using CryptoExchange.Net; -using CryptoExchange.Net.Objects; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace Binance.Net.UnitTests -{ - public abstract class RestIntergrationTest - { - public abstract TClient GetClient(ILoggerFactory loggerFactory); - public virtual bool Run { get; set; } - public bool Authenticated { get; set; } - - protected TClient CreateClient() - { - var fact = new LoggerFactory(); - fact.AddProvider(new TraceLoggerProvider()); - return GetClient(fact); - } - - protected bool ShouldRun() - { - var integrationTests = Environment.GetEnvironmentVariable("INTEGRATION"); - if (!Run && integrationTests != "1") - return false; - - return true; - } - - public async Task RunAndCheckResult(Expression>>> expre, bool authRequest) - { - if (!ShouldRun()) - return; - - var client = CreateClient(); - - var expressionBody = (MethodCallExpression)expre.Body; - if (authRequest && !Authenticated) - { - Debug.WriteLine($"Skipping {expressionBody.Method.Name}, not authenticated"); - return; - } - - var listener = new EnumValueTraceListener(); - Trace.Listeners.Add(listener); - - WebCallResult result; - try - { - result = await expre.Compile().Invoke(client); - } - catch (Exception ex) - { - throw new Exception($"Method {expressionBody.Method.Name} threw an exception: " + ex.ToLogString()); - } - finally - { - Trace.Listeners.Remove(listener); - } - - if (!result.Success) - throw new Exception($"Method {expressionBody.Method.Name} returned error: " + result.Error); - - Debug.WriteLine($"{expressionBody.Method.Name} {result}"); - } - } -} diff --git a/Binance.Net.UnitTests/RestRequestTests.cs b/Binance.Net.UnitTests/RestRequestTests.cs index a7dc78935..b175de2d8 100644 --- a/Binance.Net.UnitTests/RestRequestTests.cs +++ b/Binance.Net.UnitTests/RestRequestTests.cs @@ -22,7 +22,7 @@ public async Task ValidateSpotAccountCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/Spot/Account", "https://api.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/Spot/Account", "https://api.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.SpotApi.Account.GetAccountInfoAsync(), "GetAccountInfo", ignoreProperties: new List { "commissionRates" }); await tester.ValidateAsync(client => client.SpotApi.Account.GetFiatPaymentHistoryAsync(Enums.OrderSide.Buy), "GetFiatPaymentHistory", "data"); await tester.ValidateAsync(client => client.SpotApi.Account.GetFiatDepositWithdrawHistoryAsync(Enums.TransactionType.Withdrawal), "GetFiatDepositWithdrawHistory", "data"); @@ -94,6 +94,8 @@ public async Task ValidateSpotAccountCalls() await tester.ValidateAsync(client => client.SpotApi.Account.CrossMarginSmallLiabilityExchangeAsync(new[] { "ETH" }), "CrossMarginSmallLiabilityExchange"); await tester.ValidateAsync(client => client.SpotApi.Account.GetCrossMarginSmallLiabilityExchangeHistoryAsync(), "GetCrossMarginSmallLiabilityExchangeHistory"); await tester.ValidateAsync(client => client.SpotApi.Account.GetTradeFeeAsync(), "GetTradeFee"); + await tester.ValidateAsync(client => client.SpotApi.Account.GetAccountVipLevelAndStatusAsync(), "GetAccountVipLevelAndStatus"); + await tester.ValidateAsync(client => client.SpotApi.Account.GetCommissionRatesAsync("ETHUSDT"), "GetCommissionRates"); } [Test] @@ -104,9 +106,9 @@ public async Task ValidateSpotExchangeDataCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/Spot/ExchangeData", "https://api.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/Spot/ExchangeData", "https://api.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.SpotApi.ExchangeData.GetServerTimeAsync(), "GetServerTime", "serverTime"); - await tester.ValidateAsync(client => client.SpotApi.ExchangeData.GetExchangeInfoAsync(), "GetExchangeInfo"); + await tester.ValidateAsync(client => client.SpotApi.ExchangeData.GetExchangeInfoAsync(), "GetExchangeInfo", ignoreProperties: new List { "orderTypes", "timeInForce" }); await tester.ValidateAsync(client => client.SpotApi.ExchangeData.GetSystemStatusAsync(), "GetSystemStatus"); await tester.ValidateAsync(client => client.SpotApi.ExchangeData.GetAssetDetailsAsync(), "GetAssetDetails"); await tester.ValidateAsync(client => client.SpotApi.ExchangeData.GetRecentTradesAsync("ETHUSDT"), "GetRecentTrades"); @@ -141,7 +143,7 @@ public async Task ValidateSpotTradingCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/Spot/Trading", "https://api.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/Spot/Trading", "https://api.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.SpotApi.Trading.PlaceTestOrderAsync("ETHUSDT", Enums.OrderSide.Sell, Enums.SpotOrderType.Market, 1), "PlaceTestOrder"); await tester.ValidateAsync(client => client.SpotApi.Trading.PlaceOrderAsync("ETHUSDT", Enums.OrderSide.Sell, Enums.SpotOrderType.Market, 1), "PlaceOrder"); await tester.ValidateAsync(client => client.SpotApi.Trading.CancelOrderAsync("ETHUSDT", 123), "CancelOrder"); @@ -173,7 +175,7 @@ public async Task ValidateSpotTradingCalls() await tester.ValidateAsync(client => client.SpotApi.Trading.RedeemLeveragedTokenAsync("ETHUSDT", 1), "RedeemLeveragedToken"); await tester.ValidateAsync(client => client.SpotApi.Trading.GetLeveragedTokensRedemptionRecordsAsync("ETHUSDT", 1), "GetLeveragedTokensRedemptionRecords"); await tester.ValidateAsync(client => client.SpotApi.Trading.GetC2CTradeHistoryAsync(Enums.OrderSide.Buy), "GetC2CTradeHistory", "data"); - await tester.ValidateAsync(client => client.SpotApi.Trading.GetPayTradeHistoryAsync(), "GetPayTradeHistory", "data", new List{ "walletTypes", "walletAssetCost" }); + //await tester.ValidateAsync(client => client.SpotApi.Trading.GetPayTradeHistoryAsync(), "GetPayTradeHistory", "data", new List{ "walletTypes", "walletAssetCost" }); await tester.ValidateAsync(client => client.SpotApi.Trading.GetPayTradeHistoryAsync(), "GetPayTradeHistory2", "data", new List{ "walletTypes", "walletAssetCost" }); await tester.ValidateAsync(client => client.SpotApi.Trading.ConvertQuoteRequestAsync("USDT", "ETH", 1), "ConvertQuoteRequest"); await tester.ValidateAsync(client => client.SpotApi.Trading.GetConvertOrderStatusAsync("123"), "GetConvertOrderStatus"); @@ -197,7 +199,7 @@ public async Task ValidateUsdFuturesAccountCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/Account", "https://fapi.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/Account", "https://fapi.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.ModifyPositionModeAsync(true), "ModifyPositionMode"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.ChangeInitialLeverageAsync("ETHUSDT", 1), "ChangeInitialLeverage"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.ChangeMarginTypeAsync("ETHUSDT", Enums.FuturesMarginType.Isolated), "ChangeMarginType"); @@ -209,7 +211,6 @@ public async Task ValidateUsdFuturesAccountCalls() await tester.ValidateAsync(client => client.UsdFuturesApi.Account.StartUserStreamAsync(), "StartUserStream", "listenKey"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.KeepAliveUserStreamAsync("123"), "KeepAliveUserStream"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.StopUserStreamAsync("123"), "StopUserStream"); - await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetAccountInfoAsync(), "GetAccountInfo", ignoreProperties: new List { "bidNotional", "askNotional" }); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetBalancesAsync(), "GetBalances"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetMultiAssetsModeAsync(), "GetMultiAssetsMode"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.SetMultiAssetsModeAsync(true), "SetMultiAssetsMode"); @@ -225,6 +226,9 @@ public async Task ValidateUsdFuturesAccountCalls() await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetOrderRateLimitAsync(), "GetOrderRateLimit"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetBnbBurnStatusAsync(), "GetBnbBurnStatus"); await tester.ValidateAsync(client => client.UsdFuturesApi.Account.SetBnbBurnStatusAsync(true), "SetBnbBurnStatus"); + await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetSymbolConfigurationAsync(), "GetSymbolConfiguration"); + await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetAccountConfigurationAsync(), "GetAccountConfiguration"); + await tester.ValidateAsync(client => client.UsdFuturesApi.Account.GetAccountInfoAsync(), "GetAccountInfoV3"); } [Test] @@ -236,9 +240,9 @@ public async Task ValidateUsdFuturesExchangeDataCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/ExchangeData", "https://fapi.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/ExchangeData", "https://fapi.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.UsdFuturesApi.ExchangeData.GetServerTimeAsync(), "GetServerTime", "serverTime"); - await tester.ValidateAsync(client => client.UsdFuturesApi.ExchangeData.GetExchangeInfoAsync(), "GetExchangeInfo"); + await tester.ValidateAsync(client => client.UsdFuturesApi.ExchangeData.GetExchangeInfoAsync(), "GetExchangeInfo", ignoreProperties: new List { "orderTypes", "timeInForce" }); await tester.ValidateAsync(client => client.UsdFuturesApi.ExchangeData.GetOrderBookAsync("ETHUSDT"), "GetOrderBook"); await tester.ValidateAsync(client => client.UsdFuturesApi.ExchangeData.GetAggregatedTradeHistoryAsync("ETHUSDT"), "GetAggregatedTradeHistory"); await tester.ValidateAsync(client => client.UsdFuturesApi.ExchangeData.GetFundingInfoAsync(), "GetFundingInfo", ignoreProperties: new List { "disclaimer" }); @@ -273,7 +277,7 @@ public async Task ValidateUsdFuturesTradingCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/Trading", "https://fapi.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/Trading", "https://fapi.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.PlaceOrderAsync("ETHUSDT", Enums.OrderSide.Buy, Enums.FuturesOrderType.Market, 1), "PlaceOrder"); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.PlaceMultipleOrdersAsync(new[] { new BinanceFuturesBatchOrder { } }), "PlaceMultipleOrders", skipResponseValidation: true); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.GetOrderAsync("ETHUSDT", 123), "GetOrder"); @@ -289,7 +293,7 @@ public async Task ValidateUsdFuturesTradingCalls() await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.GetOrdersAsync("ETHUSDT"), "GetOrders"); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.GetForcedOrdersAsync("ETHUSDT"), "GetForcedOrders"); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.GetUserTradesAsync("ETHUSDT"), "GetUserTrades"); - + await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.GetPositionsAsync(), "GetPositions"); } [Test] @@ -301,7 +305,7 @@ public async Task ValidateUsdFuturesTradingAlgoCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/Trading", "https://api.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/UsdFutures/Trading", "https://api.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.PlaceVolumeParticipationOrderAsync("ETHUSDT", Enums.OrderSide.Buy, 1, Enums.OrderUrgency.Medium), "PlaceVolumeParticipationOrder"); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.PlaceTimeWeightedAveragePriceOrderAsync("ETHUSDT", Enums.OrderSide.Buy, 1, 1), "PlaceTimeWeightedAveragePriceOrder"); await tester.ValidateAsync(client => client.UsdFuturesApi.Trading.CancelAlgoOrderAsync(123), "CancelAlgoOrder"); @@ -320,7 +324,7 @@ public async Task ValidateCoinFuturesAccountCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/CoinFutures/Account", "https://dapi.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/CoinFutures/Account", "https://dapi.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.CoinFuturesApi.Account.ModifyPositionModeAsync(true), "ModifyPositionMode"); //await tester.ValidateAsync(client => client.CoinFuturesApi.Account.GetPositionModeAsync(), "GetPositionMode"); await tester.ValidateAsync(client => client.CoinFuturesApi.Account.ChangeInitialLeverageAsync("ETHUSDT", 1), "ChangeInitialLeverage"); @@ -350,9 +354,9 @@ public async Task ValidateCoinFuturesExchangeDataCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/CoinFutures/ExchangeData", "https://dapi.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/CoinFutures/ExchangeData", "https://dapi.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.CoinFuturesApi.ExchangeData.GetServerTimeAsync(), "GetServerTime", "serverTime"); - await tester.ValidateAsync(client => client.CoinFuturesApi.ExchangeData.GetExchangeInfoAsync(), "GetExchangeInfo"); + await tester.ValidateAsync(client => client.CoinFuturesApi.ExchangeData.GetExchangeInfoAsync(), "GetExchangeInfo", ignoreProperties: new List { "orderTypes", "timeInForce" }); await tester.ValidateAsync(client => client.CoinFuturesApi.ExchangeData.GetOrderBookAsync("ETHUSDT"), "GetOrderBook"); await tester.ValidateAsync(client => client.CoinFuturesApi.ExchangeData.GetAggregatedTradeHistoryAsync("ETHUSDT"), "GetAggregatedTradeHistory"); await tester.ValidateAsync(client => client.CoinFuturesApi.ExchangeData.GetFundingRatesAsync("ETHUSDT"), "GetFundingRates"); @@ -385,7 +389,7 @@ public async Task ValidateCoinFuturesTradingCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/CoinFutures/Trading", "https://dapi.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/CoinFutures/Trading", "https://dapi.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.CoinFuturesApi.Trading.PlaceOrderAsync("ETHUSDT", Enums.OrderSide.Buy, Enums.FuturesOrderType.Market, 1, 1), "PlaceOrder"); await tester.ValidateAsync(client => client.CoinFuturesApi.Trading.PlaceMultipleOrdersAsync(new[] { new BinanceFuturesBatchOrder() }), "PlaceMultipleOrders", skipResponseValidation: true); await tester.ValidateAsync(client => client.CoinFuturesApi.Trading.GetOrderAsync("ETHUSDT", 123), "GetOrder"); @@ -409,7 +413,7 @@ public async Task ValidateGeneralBrokerageCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/General/Brokerage", "https://api.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/General/Brokerage", "https://api.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.GeneralApi.Brokerage.CreateSubAccountAsync(), "CreateSubAccount"); await tester.ValidateAsync(client => client.GeneralApi.Brokerage.GetSubAccountsAsync(), "GetSubAccounts"); await tester.ValidateAsync(client => client.GeneralApi.Brokerage.CreateApiKeyForSubAccountAsync("123", true), "CreateApiKeyForSubAccount"); @@ -428,7 +432,7 @@ public async Task ValidateGeneralCryptoLoansCalls() opts.AutoTimestamp = false; opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new RestRequestValidator(client, "Endpoints/General/CryptoLoans", "https://api.binance.com", IsAuthenticated, stjCompare: false); + var tester = new RestRequestValidator(client, "Endpoints/General/CryptoLoans", "https://api.binance.com", IsAuthenticated, stjCompare: true); await tester.ValidateAsync(client => client.GeneralApi.CryptoLoans.GetIncomeHistoryAsync("ETH"), "GetIncomeHistory"); await tester.ValidateAsync(client => client.GeneralApi.CryptoLoans.BorrowAsync("ETH", "USDT", 1), "Borrow"); await tester.ValidateAsync(client => client.GeneralApi.CryptoLoans.GetBorrowHistoryAsync(), "GetBorrowHistory"); diff --git a/Binance.Net.UnitTests/SocketSubscriptionTests.cs b/Binance.Net.UnitTests/SocketSubscriptionTests.cs index 735c75f4e..fd42285f0 100644 --- a/Binance.Net.UnitTests/SocketSubscriptionTests.cs +++ b/Binance.Net.UnitTests/SocketSubscriptionTests.cs @@ -19,9 +19,9 @@ public async Task ValidateSpotExchangeDataSubscriptions() { opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new SocketSubscriptionValidator(client, "Subscriptions/Spot/ExchangeData", "https://api.binance.com", "data", stjCompare: false); - await tester.ValidateAsync((client, handler) => client.SpotApi.ExchangeData.SubscribeToTradeUpdatesAsync("BTCUSDT", handler), "Trades"); - await tester.ValidateAsync((client, handler) => client.SpotApi.ExchangeData.SubscribeToAggregatedTradeUpdatesAsync("BTCUSDT", handler), "AggregatedTrades"); + var tester = new SocketSubscriptionValidator(client, "Subscriptions/Spot/ExchangeData", "https://api.binance.com", "data", stjCompare: true); + //await tester.ValidateAsync((client, handler) => client.SpotApi.ExchangeData.SubscribeToTradeUpdatesAsync("BTCUSDT", handler), "Trades"); + //await tester.ValidateAsync((client, handler) => client.SpotApi.ExchangeData.SubscribeToAggregatedTradeUpdatesAsync("BTCUSDT", handler), "AggregatedTrades"); await tester.ValidateAsync((client, handler) => client.SpotApi.ExchangeData.SubscribeToKlineUpdatesAsync("BTCUSDT", Enums.KlineInterval.EightHour, handler), "Klines", ignoreProperties: new List { "B" }); await tester.ValidateAsync((client, handler) => client.SpotApi.ExchangeData.SubscribeToMiniTickerUpdatesAsync("BTCUSDT", handler), "MiniTicker"); await tester.ValidateAsync((client, handler) => client.SpotApi.ExchangeData.SubscribeToBookTickerUpdatesAsync("BTCUSDT", handler), "BookTicker"); @@ -37,7 +37,7 @@ public async Task ValidateSpotAccountSubscriptions() { opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new SocketSubscriptionValidator(client, "Subscriptions/Spot/Account", "https://api.binance.com", "data", stjCompare: false); + var tester = new SocketSubscriptionValidator(client, "Subscriptions/Spot/Account", "https://api.binance.com", "data", stjCompare: true); await tester.ValidateAsync((client, handler) => client.SpotApi.Account.SubscribeToUserDataUpdatesAsync("123", onOrderUpdateMessage: handler), "Order"); await tester.ValidateAsync((client, handler) => client.SpotApi.Account.SubscribeToUserDataUpdatesAsync("123", onOcoOrderUpdateMessage: handler), "OcoOrder"); await tester.ValidateAsync((client, handler) => client.SpotApi.Account.SubscribeToUserDataUpdatesAsync("123", onAccountPositionMessage: handler), "AccountPosition"); @@ -51,7 +51,7 @@ public async Task ValidateUsdFuturesSubscriptions() { opts.ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials("123", "456"); }); - var tester = new SocketSubscriptionValidator(client, "Subscriptions/UsdFutures", "https://fapi.binance.com", "data", stjCompare: false); + var tester = new SocketSubscriptionValidator(client, "Subscriptions/UsdFutures", "https://fapi.binance.com", "data", stjCompare: true); await tester.ValidateAsync((client, handler) => client.UsdFuturesApi.SubscribeToMarkPriceUpdatesAsync("BTCUSDT", 1000, handler), "MarkPrice"); await tester.ValidateAsync((client, handler) => client.UsdFuturesApi.SubscribeToKlineUpdatesAsync("BTCUSDT", Enums.KlineInterval.OneMonth, handler), "Klines", ignoreProperties: new List { "B" }); await tester.ValidateAsync((client, handler) => client.UsdFuturesApi.SubscribeToContinuousContractKlineUpdatesAsync("BTCUSDT", Enums.ContractType.Perpetual, Enums.KlineInterval.OneMonth, handler), "ContKlines", ignoreProperties: new List { "B" }); diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/Account/AccountPosition.txt b/Binance.Net.UnitTests/Subscriptions/Spot/Account/AccountPosition.txt index d666e6385..c1128f08b 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/Account/AccountPosition.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/Account/AccountPosition.txt @@ -5,14 +5,14 @@ "stream": "123", "data": { - "e": "outboundAccountPosition", //Event type - "E": 1564034571105, //Event Time - "u": 1564034571073, //Time of last account update - "B": [ //Balances Array + "e": "outboundAccountPosition", + "E": 1564034571105, + "u": 1564034571073, + "B": [ { - "a": "ETH", //Asset - "f": "10000.000000", //Free - "l": "0.000000" //Locked + "a": "ETH", + "f": "10000.000000", + "l": "0.000000" } ] } diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/Account/Balance.txt b/Binance.Net.UnitTests/Subscriptions/Spot/Account/Balance.txt index 01f81fcc3..6488deb22 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/Account/Balance.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/Account/Balance.txt @@ -5,10 +5,10 @@ "stream": "123", "data": { - "e": "balanceUpdate", //Event Type - "E": 1573200697110, //Event Time - "a": "BTC", //Asset - "d": "100.00000000", //Balance Delta - "T": 1573200697068 //Clear Time + "e": "balanceUpdate", + "E": 1573200697110, + "a": "BTC", + "d": "100.00000000", + "T": 1573200697068 } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/Account/OcoOrder.txt b/Binance.Net.UnitTests/Subscriptions/Spot/Account/OcoOrder.txt index 0a951b246..adf4f28aa 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/Account/OcoOrder.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/Account/OcoOrder.txt @@ -5,21 +5,21 @@ "stream": "123", "data": { - "e": "listStatus", //Event Type - "E": 1564035303637, //Event Time - "s": "ETHBTC", //Symbol - "g": 2, //OrderListId - "c": "OCO", //Contingency Type - "l": "EXEC_STARTED", //List Status Type - "L": "EXECUTING", //List Order Status - "r": "NONE", //List Reject Reason - "C": "F4QN4G8DlFATFlIUQ0cjdD", //List Client Order ID - "T": 1564035303625, //Transaction Time - "O": [ //An array of objects + "e": "listStatus", + "E": 1564035303637, + "s": "ETHBTC", + "g": 2, + "c": "OCO", + "l": "EXEC_STARTED", + "L": "EXECUTING", + "r": "NONE", + "C": "F4QN4G8DlFATFlIUQ0cjdD", + "T": 1564035303625, + "O": [ { - "s": "ETHBTC", //Symbol - "i": 17, // orderId - "c": "AJYsMjErWJesZvqlJCTUgL" //ClientOrderId + "s": "ETHBTC", + "i": 17, + "c": "AJYsMjErWJesZvqlJCTUgL" }, { "s": "ETHBTC", diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/Account/Order.txt b/Binance.Net.UnitTests/Subscriptions/Spot/Account/Order.txt index aa97541c2..75675246b 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/Account/Order.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/Account/Order.txt @@ -5,39 +5,39 @@ "stream": "123", "data": { - "e": "executionReport", // Event type - "E": 1499405658658, // Event time - "s": "ETHBTC", // Symbol - "c": "mUvoqJxFIILMdfAW5iGSOW", // Client order ID - "S": "BUY", // Side - "o": "LIMIT", // Order type - "f": "GTC", // Time in force - "q": "1.00000000", // Order quantity - "p": "0.10264410", // Order price - "P": "0.00000000", // Stop price - "F": "0.00000000", // Iceberg quantity - "g": -1, // OrderListId - "C": "", // Original client order ID; This is the ID of the order being canceled - "x": "NEW", // Current execution type - "X": "NEW", // Current order status - "r": "NONE", // Order reject reason; will be an error code. - "i": 4293153, // Order ID - "l": "0.00000000", // Last executed quantity - "z": "0.00000000", // Cumulative filled quantity - "L": "0.00000000", // Last executed price - "n": "0", // Commission amount - "N": null, // Commission asset - "T": 1499405658657, // Transaction time - "t": -1, // Trade ID - "I": 8641984, // Ignore - "w": true, // Is the order on the book? - "m": false, // Is this trade the maker side? - "M": false, // Ignore - "O": 1499405658657, // Order creation time - "Z": "0.00000000", // Cumulative quote asset transacted quantity - "Y": "0.00000000", // Last quote asset transacted quantity (i.e. lastPrice * lastQty) - "Q": "0.00000000", // Quote Order Quantity - "W": 1499405658657, // Working Time; This is only visible if the order has been placed on the book. - "V": "NONE" // selfTradePreventionMode + "e": "executionReport", + "E": 1499405658658, + "s": "ETHBTC", + "c": "mUvoqJxFIILMdfAW5iGSOW", + "S": "BUY", + "o": "LIMIT", + "f": "GTC", + "q": "1.00000000", + "p": "0.10264410", + "P": "0.00000000", + "F": "0.00000000", + "g": -1, + "C": "", + "x": "NEW", + "X": "NEW", + "r": "NONE", + "i": 4293153, + "l": "0.00000000", + "z": "0.00000000", + "L": "0.00000000", + "n": "0", + "N": null, + "T": 1499405658657, + "t": -1, + "I": 8641984, + "w": true, + "m": false, + "M": false, + "O": 1499405658657, + "Z": "0.00000000", + "Y": "0.00000000", + "Q": "0.00000000", + "W": 1499405658657, + "V": "NONE" } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/BookTicker.txt b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/BookTicker.txt index 0bfc7913b..6d55c5664 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/BookTicker.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/BookTicker.txt @@ -5,11 +5,11 @@ "stream": "btcusdt@bookTicker", "data": { - "u":400900217, // order book updateId - "s":"BNBUSDT", // symbol - "b":"25.35190000", // best bid price - "B":"31.21000000", // best bid qty - "a":"25.36520000", // best ask price - "A":"40.66000000" // best ask qty + "u":400900217, + "s":"BNBUSDT", + "b":"25.35190000", + "B":"31.21000000", + "a":"25.36520000", + "A":"40.66000000" } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Klines.txt b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Klines.txt index 7f0b04208..afaf8e2e8 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Klines.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Klines.txt @@ -5,27 +5,27 @@ "stream": "btcusdt@kline_8h", "data": { - "e": "kline", // Event type - "E": 1672515782136, // Event time - "s": "BNBBTC", // Symbol + "e": "kline", + "E": 1672515782136, + "s": "BNBBTC", "k": { - "t": 123400000, // Kline start time - "T": 123460000, // Kline close time - "s": "BNBBTC", // Symbol - "i": "1m", // Interval - "f": 100, // First trade ID - "L": 200, // Last trade ID - "o": "0.0010", // Open price - "c": "0.0020", // Close price - "h": "0.0025", // High price - "l": "0.0015", // Low price - "v": "1000", // Base asset volume - "n": 100, // Number of trades - "x": false, // Is this kline closed? - "q": "1.0000", // Quote asset volume - "V": "500", // Taker buy base asset volume - "Q": "0.500", // Taker buy quote asset volume - "B": "123456" // Ignore + "t": 123400000, + "T": 123460000, + "s": "BNBBTC", + "i": "1m", + "f": 100, + "L": 200, + "o": "0.0010", + "c": "0.0020", + "h": "0.0025", + "l": "0.0015", + "v": "1000", + "n": 100, + "x": false, + "q": "1.0000", + "V": "500", + "Q": "0.500", + "B": "123456" } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/MiniTicker.txt b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/MiniTicker.txt index 9ed70a967..2fa323e59 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/MiniTicker.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/MiniTicker.txt @@ -5,14 +5,14 @@ "stream": "btcusdt@miniTicker", "data": { - "e": "24hrMiniTicker", // Event type - "E": 1672515782136, // Event time - "s": "BNBBTC", // Symbol - "c": "0.0025", // Close price - "o": "0.0010", // Open price - "h": "0.0025", // High price - "l": "0.0010", // Low price - "v": "10000", // Total traded base asset volume - "q": "18" // Total traded quote asset volume + "e": "24hrMiniTicker", + "E": 1672515782136, + "s": "BNBBTC", + "c": "0.0025", + "o": "0.0010", + "h": "0.0025", + "l": "0.0010", + "v": "10000", + "q": "18" } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/PartialBook.txt b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/PartialBook.txt index 5843f2812..d2d0840b4 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/PartialBook.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/PartialBook.txt @@ -5,17 +5,17 @@ "stream": "btcusdt@depth5@100ms", "data": { - "lastUpdateId": 160, // Last update ID - "bids": [ // Bids to be updated + "lastUpdateId": 160, + "bids": [ [ - "0.0024", // Price level to be updated - "10" // Quantity + "0.0024", + "10" ] ], - "asks": [ // Asks to be updated + "asks": [ [ - "0.0026", // Price level to be updated - "100" // Quantity + "0.0026", + "100" ] ] } diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/RollingWindowTicker.txt b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/RollingWindowTicker.txt index 74d3b4176..cb55c9500 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/RollingWindowTicker.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/RollingWindowTicker.txt @@ -5,22 +5,22 @@ "stream": "btcusdt@ticker_1h", "data": { - "e": "1hTicker", // Event type - "E": 1672515782136, // Event time - "s": "BNBBTC", // Symbol - "p": "0.0015", // Price change - "P": "250.00", // Price change percent - "o": "0.0010", // Open price - "h": "0.0025", // High price - "l": "0.0010", // Low price - "c": "0.0025", // Last price - "w": "0.0018", // Weighted average price - "v": "10000", // Total traded base asset volume - "q": "18", // Total traded quote asset volume - "O": 0, // Statistics open time - "C": 86400000, // Statistics close time - "F": 0, // First trade ID - "L": 18150, // Last trade Id - "n": 18151 // Total number of trades + "e": "1hTicker", + "E": 1672515782136, + "s": "BNBBTC", + "p": "0.0015", + "P": "250.00", + "o": "0.0010", + "h": "0.0025", + "l": "0.0010", + "c": "0.0025", + "w": "0.0018", + "v": "10000", + "q": "18", + "O": 0, + "C": 86400000, + "F": 0, + "L": 18150, + "n": 18151 } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Ticker.txt b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Ticker.txt index 7c64f6804..8425c9fc7 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Ticker.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Ticker.txt @@ -5,28 +5,28 @@ "stream": "btcusdt@ticker", "data": { - "e": "24hrTicker", // Event type - "E": 1672515782136, // Event time - "s": "BNBBTC", // Symbol - "p": "0.0015", // Price change - "P": "250.00", // Price change percent - "w": "0.0018", // Weighted average price - "x": "0.0009", // First trade(F)-1 price (first trade before the 24hr rolling window) - "c": "0.0025", // Last price - "Q": "10", // Last quantity - "b": "0.0024", // Best bid price - "B": "10", // Best bid quantity - "a": "0.0026", // Best ask price - "A": "100", // Best ask quantity - "o": "0.0010", // Open price - "h": "0.0025", // High price - "l": "0.0010", // Low price - "v": "10000", // Total traded base asset volume - "q": "18", // Total traded quote asset volume - "O": 0, // Statistics open time - "C": 86400000, // Statistics close time - "F": 0, // First trade ID - "L": 18150, // Last trade Id - "n": 18151 // Total number of trades + "e": "24hrTicker", + "E": 1672515782136, + "s": "BNBBTC", + "p": "0.0015", + "P": "250.00", + "w": "0.0018", + "x": "0.0009", + "c": "0.0025", + "Q": "10", + "b": "0.0024", + "B": "10", + "a": "0.0026", + "A": "100", + "o": "0.0010", + "h": "0.0025", + "l": "0.0010", + "v": "10000", + "q": "18", + "O": 0, + "C": 86400000, + "F": 0, + "L": 18150, + "n": 18151 } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Trades.txt b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Trades.txt index 0dc58acc2..6cd6d18c3 100644 --- a/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Trades.txt +++ b/Binance.Net.UnitTests/Subscriptions/Spot/ExchangeData/Trades.txt @@ -5,16 +5,16 @@ "stream": "btcusdt@trade", "data": { - "e": "trade", // Event type - "E": 1672515782136, // Event time - "s": "BNBBTC", // Symbol - "t": 12345, // Trade ID - "p": "0.001", // Price - "q": "100", // Quantity - "b": 88, // Buyer order ID - "a": 50, // Seller order ID - "T": 1672515782136, // Trade time - "m": true, // Is the buyer the market maker? - "M": true // Ignore + "e": "trade", + "E": 1672515782136, + "s": "BNBBTC", + "t": 12345, + "p": "0.001", + "q": "100", + "b": 88, + "a": 50, + "T": 1672515782136, + "m": true, + "M": true } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/AggTrades.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/AggTrades.txt index d4e9f7b87..a3bd5d24d 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/AggTrades.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/AggTrades.txt @@ -5,15 +5,15 @@ "stream": "btcusdt@aggTrade", "data": { - "e": "aggTrade", // Event type - "E": 123456789, // Event time - "s": "BTCUSDT", // Symbol - "a": 5933014, // Aggregate trade ID - "p": "0.001", // Price - "q": "100", // Quantity - "f": 100, // First trade ID - "l": 105, // Last trade ID - "T": 123456785, // Trade time - "m": true, // Is the buyer the market maker? + "e": "aggTrade", + "E": 123456789, + "s": "BTCUSDT", + "a": 5933014, + "p": "0.001", + "q": "100", + "f": 100, + "l": 105, + "T": 123456785, + "m": true } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/AssetIndex.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/AssetIndex.txt index 756bbed72..b2387b3b2 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/AssetIndex.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/AssetIndex.txt @@ -8,16 +8,16 @@ { "e":"assetIndexUpdate", "E":1686749230000, - "s":"ADAUSD", // asset index symbol - "i":"0.27462452", // index price - "b":"0.10000000", // bid buffer - "a":"0.10000000", // ask buffer - "B":"0.24716207", // bid rate - "A":"0.30208698", // ask rate - "q":"0.05000000", // auto exchange bid buffer - "g":"0.05000000", // auto exchange ask buffer - "Q":"0.26089330", // auto exchange bid rate - "G":"0.28835575" // auto exchange ask rate + "s":"ADAUSD", + "i":"0.27462452", + "b":"0.10000000", + "a":"0.10000000", + "B":"0.24716207", + "A":"0.30208698", + "q":"0.05000000", + "g":"0.05000000", + "Q":"0.26089330", + "G":"0.28835575" }, { "e":"assetIndexUpdate", diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Book.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Book.txt index 1bebb9a41..47fe9da66 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Book.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Book.txt @@ -5,23 +5,23 @@ "stream": "btcusdt@depth@100ms", "data": { - "e": "depthUpdate", // Event type - "E": 123456789, // Event time - "T": 123456788, // Transaction time - "s": "BTCUSDT", // Symbol - "U": 157, // First update ID in event - "u": 160, // Final update ID in event - "pu": 149, // Final update Id in last stream(ie `u` in last stream) - "b": [ // Bids to be updated + "e": "depthUpdate", + "E": 123456789, + "T": 123456788, + "s": "BTCUSDT", + "U": 157, + "u": 160, + "pu": 149, + "b": [ [ - "0.0024", // Price level to be updated - "10" // Quantity + "0.0024", + "10" ] ], - "a": [ // Asks to be updated + "a": [ [ - "0.0026", // Price level to be updated - "100" // Quantity + "0.0026", + "100" ] ] } diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/BookTicker.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/BookTicker.txt index 8d4d76964..c891b2c29 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/BookTicker.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/BookTicker.txt @@ -5,14 +5,14 @@ "stream": "btcusdt@bookTicker", "data": { - "e":"bookTicker", // event type - "u":400900217, // order book updateId - "E": 1568014460893, // event time - "T": 1568014460891, // transaction time - "s":"BNBUSDT", // symbol - "b":"25.35190000", // best bid price - "B":"31.21000000", // best bid qty - "a":"25.36520000", // best ask price - "A":"40.66000000" // best ask qty + "e":"bookTicker", + "u":400900217, + "E": 1568014460893, + "T": 1568014460891, + "s":"BNBUSDT", + "b":"25.35190000", + "B":"31.21000000", + "a":"25.36520000", + "A":"40.66000000" } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/CompositIndex.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/CompositIndex.txt index 875f790c2..39154e668 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/CompositIndex.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/CompositIndex.txt @@ -5,18 +5,18 @@ "stream": "btcusdt@compositeIndex", "data": { - "e":"compositeIndex", // Event type - "E":1602310596000, // Event time - "s":"DEFIUSDT", // Symbol - "p":"554.41604065", // Price + "e":"compositeIndex", + "E":1602310596000, + "s":"DEFIUSDT", + "p":"554.41604065", "C":"baseAsset", - "c":[ // Composition + "c":[ { - "b":"BAL", // Base asset - "q":"USDT", // Quote asset - "w":"1.04884844", // Weight in quantity - "W":"0.01457800", // Weight in percentage - "i":"24.33521021" // Index price + "b":"BAL", + "q":"USDT", + "w":"1.04884844", + "W":"0.01457800", + "i":"24.33521021" }, { "b":"BAND", diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/ConditionalTrigger.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/ConditionalTrigger.txt index 93f6fb1fb..18a717161 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/ConditionalTrigger.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/ConditionalTrigger.txt @@ -5,13 +5,13 @@ "stream": "123", "data": { - "e":"CONDITIONAL_ORDER_TRIGGER_REJECT", // Event Type - "E":1685517224945, // Event Time - "T":1685517224955, // me message send Time + "e":"CONDITIONAL_ORDER_TRIGGER_REJECT", + "E":1685517224945, + "T":1685517224955, "or":{ - "s":"ETHUSDT", // Symbol - "i":155618472834, // orderId - "r":"Due to the order could not be filled immediately, the FOK order has been rejected. The order will not be recorded in the order history", // reject reason + "s":"ETHUSDT", + "i":155618472834, + "r":"Due to the order could not be filled immediately, the FOK order has been rejected. The order will not be recorded in the order history" } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/ContKlines.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/ContKlines.txt index 0226c9dbf..806d80ced 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/ContKlines.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/ContKlines.txt @@ -5,27 +5,27 @@ "stream": "btcusdt_perpetual@continuousKline_1M", "data": { - "e":"continuous_kline", // Event type - "E":1607443058651, // Event time - "ps":"BTCUSDT", // Pair - "ct":"PERPETUAL", // Contract type + "e":"continuous_kline", + "E":1607443058651, + "ps":"BTCUSDT", + "ct":"PERPETUAL", "k":{ - "t":1607443020000, // Kline start time - "T":1607443079999, // Kline close time - "i":"1m", // Interval - "f":116467658886, // First updateId - "L":116468012423, // Last updateId - "o":"18787.00", // Open price - "c":"18804.04", // Close price - "h":"18804.04", // High price - "l":"18786.54", // Low price - "v":"197.664", // volume - "n": 543, // Number of trades - "x":false, // Is this kline closed? - "q":"3715253.19494", // Quote asset volume - "V":"184.769", // Taker buy volume - "Q":"3472925.84746", //Taker buy quote asset volume - "B":"0" // Ignore + "t":1607443020000, + "T":1607443079999, + "i":"1m", + "f":116467658886, + "L":116468012423, + "o":"18787.00", + "c":"18804.04", + "h":"18804.04", + "l":"18786.54", + "v":"197.664", + "n": 543, + "x":false, + "q":"3715253.19494", + "V":"184.769", + "Q":"3472925.84746", + "B":"0" } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/GridUpdate.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/GridUpdate.txt index 9bc2dfc16..e69a06a52 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/GridUpdate.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/GridUpdate.txt @@ -5,20 +5,20 @@ "stream": "123", "data": { - "e": "GRID_UPDATE", // Event Type - "T": 1669262908216, // Transaction Time - "E": 1669262908218, // Event Time + "e": "GRID_UPDATE", + "T": 1669262908216, + "E": 1669262908218, "gu": { - "si": 176057039, // Strategy ID - "st": "GRID", // Strategy Type - "ss": "WORKING", // Strategy Status - "s": "BTCUSDT", // Symbol - "r": "-0.00300716", // Realized PNL - "up": "16720", // Unmatched Average Price - "uq": "-0.001", // Unmatched Qty - "uf": "-0.00300716", // Unmatched Fee - "mp": "0.0", // Matched PNL - "ut": 1669262908197 // Update Time + "si": 176057039, + "st": "GRID", + "ss": "WORKING", + "s": "BTCUSDT", + "r": "-0.00300716", + "up": "16720", + "uq": "-0.001", + "uf": "-0.00300716", + "mp": "0.0", + "ut": 1669262908197 } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Klines.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Klines.txt index 2bbf3db99..9b3064ceb 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Klines.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Klines.txt @@ -5,27 +5,27 @@ "stream": "btcusdt@kline_1M", "data": { - "e": "kline", // Event type - "E": 1638747660000, // Event time - "s": "BTCUSDT", // Symbol + "e": "kline", + "E": 1638747660000, + "s": "BTCUSDT", "k": { - "t": 1638747660000, // Kline start time - "T": 1638747719999, // Kline close time - "s": "BTCUSDT", // Symbol - "i": "1m", // Interval - "f": 100, // First trade ID - "L": 200, // Last trade ID - "o": "0.0010", // Open price - "c": "0.0020", // Close price - "h": "0.0025", // High price - "l": "0.0015", // Low price - "v": "1000", // Base asset volume - "n": 100, // Number of trades - "x": false, // Is this kline closed? - "q": "1.0000", // Quote asset volume - "V": "500", // Taker buy base asset volume - "Q": "0.500", // Taker buy quote asset volume - "B": "123456" // Ignore + "t": 1638747660000, + "T": 1638747719999, + "s": "BTCUSDT", + "i": "1m", + "f": 100, + "L": 200, + "o": "0.0010", + "c": "0.0020", + "h": "0.0025", + "l": "0.0015", + "v": "1000", + "n": 100, + "x": false, + "q": "1.0000", + "V": "500", + "Q": "0.500", + "B": "123456" } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Leverage.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Leverage.txt index 519bb21bd..e82d0d2d9 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Leverage.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Leverage.txt @@ -5,12 +5,12 @@ "stream": "123", "data": { - "e":"ACCOUNT_CONFIG_UPDATE", // Event Type - "E":1611646737479, // Event Time - "T":1611646737476, // Transaction Time + "e":"ACCOUNT_CONFIG_UPDATE", + "E":1611646737479, + "T":1611646737476, "ac":{ - "s":"BTCUSDT", // symbol - "l":25 // leverage + "s":"BTCUSDT", + "l":25 } } diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Liquidations.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Liquidations.txt index 9dd605a2f..7c22867f8 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Liquidations.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Liquidations.txt @@ -5,20 +5,20 @@ "stream": "btcusdt@forceOrder", "data": { - "e":"forceOrder", // Event Type - "E":1568014460893, // Event Time + "e":"forceOrder", + "E":1568014460893, "o":{ - "s":"BTCUSDT", // Symbol - "S":"SELL", // Side - "o":"LIMIT", // Order Type - "f":"IOC", // Time in Force - "q":"0.014", // Original Quantity - "p":"9910", // Price - "ap":"9910", // Average Price - "X":"FILLED", // Order Status - "l":"0.014", // Order Last Filled Quantity - "z":"0.014", // Order Filled Accumulated Quantity - "T":1568014460893, // Order Trade Time + "s":"BTCUSDT", + "S":"SELL", + "o":"LIMIT", + "f":"IOC", + "q":"0.014", + "p":"9910", + "ap":"9910", + "X":"FILLED", + "l":"0.014", + "z":"0.014", + "T":1568014460893 } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarginUpdate.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarginUpdate.txt index 413f023bb..43662d867 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarginUpdate.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarginUpdate.txt @@ -5,19 +5,19 @@ "stream": "123", "data": { - "e":"MARGIN_CALL", // Event Type - "E":1587727187525, // Event Time - "cw":"3.16812045", // Cross Wallet Balance. Only pushed with crossed position margin call - "p":[ // Position(s) of Margin Call + "e":"MARGIN_CALL", + "E":1587727187525, + "cw":"3.16812045", + "p":[ { - "s":"ETHUSDT", // Symbol - "ps":"LONG", // Position Side - "pa":"1.327", // Position Amount - "mt":"CROSSED", // Margin Type - "iw":"0", // Isolated Wallet (if isolated position) - "mp":"187.17127", // Mark Price - "up":"-1.166074", // Unrealized PnL - "mm":"1.614445" // Maintenance Margin Required + "s":"ETHUSDT", + "ps":"LONG", + "pa":"1.327", + "mt":"CROSSED", + "iw":"0", + "mp":"187.17127", + "up":"-1.166074", + "mm":"1.614445" } ] } diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarkPrice.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarkPrice.txt index 31f0ce8f6..1cc31f29a 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarkPrice.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MarkPrice.txt @@ -5,13 +5,13 @@ "stream": "btcusdt@markPrice@1s", "data": { - "e": "markPriceUpdate", // Event type - "E": 1562305380000, // Event time - "s": "BTCUSDT", // Symbol - "p": "11794.15000000", // Mark price - "i": "11784.62659091", // Index price - "P": "11784.25641265", // Estimated Settle Price, only useful in the last hour before the settlement starts - "r": "0.00038167", // Funding rate - "T": 1562306400000 // Next funding time + "e": "markPriceUpdate", + "E": 1562305380000, + "s": "BTCUSDT", + "p": "11794.15000000", + "i": "11784.62659091", + "P": "11784.25641265", + "r": "0.00038167", + "T": 1562306400000 } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MiniTicker.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MiniTicker.txt index c89b8997a..27ca09412 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MiniTicker.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MiniTicker.txt @@ -5,14 +5,14 @@ "stream": "btcusdt@miniTicker", "data": { - "e": "24hrMiniTicker", // Event type - "E": 123456789, // Event time - "s": "BTCUSDT", // Symbol - "c": "0.0025", // Close price - "o": "0.0010", // Open price - "h": "0.0025", // High price - "l": "0.0010", // Low price - "v": "10000", // Total traded base asset volume - "q": "18" // Total traded quote asset volume + "e": "24hrMiniTicker", + "E": 123456789, + "s": "BTCUSDT", + "c": "0.0025", + "o": "0.0010", + "h": "0.0025", + "l": "0.0010", + "v": "10000", + "q": "18" } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MultiAssetMode.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MultiAssetMode.txt index 9cbe497e9..dd537d4b3 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/MultiAssetMode.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/MultiAssetMode.txt @@ -5,11 +5,11 @@ "stream": "123", "data": { - "e":"ACCOUNT_CONFIG_UPDATE", // Event Type - "E":1611646737479, // Event Time - "T":1611646737476, // Transaction Time - "ai":{ // User's Account Configuration - "j":true // Multi-Assets Mode + "e":"ACCOUNT_CONFIG_UPDATE", + "E":1611646737479, + "T":1611646737476, + "ai":{ + "j":true } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/OrderUpdate.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/OrderUpdate.txt index 98f7db9ac..ad6cffeeb 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/OrderUpdate.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/OrderUpdate.txt @@ -5,50 +5,46 @@ "stream": "123", "data": { - "e":"ORDER_TRADE_UPDATE", // Event Type - "E":1568879465651, // Event Time - "T":1568879465650, // Transaction Time + "e":"ORDER_TRADE_UPDATE", + "E":1568879465651, + "T":1568879465650, "o":{ - "s":"BTCUSDT", // Symbol - "c":"TEST", // Client Order Id - // special client order id: - // starts with "autoclose-": liquidation order - // "adl_autoclose": ADL auto close order - // "settlement_autoclose-": settlement order for delisting or delivery - "S":"SELL", // Side - "o":"TRAILING_STOP_MARKET", // Order Type - "f":"GTC", // Time in Force - "q":"0.001", // Original Quantity - "p":"0", // Original Price - "ap":"0", // Average Price - "sp":"7103.04", // Stop Price. Please ignore with TRAILING_STOP_MARKET order - "x":"NEW", // Execution Type - "X":"NEW", // Order Status - "i":8886774, // Order Id - "l":"0", // Order Last Filled Quantity - "z":"0", // Order Filled Accumulated Quantity - "L":"0", // Last Filled Price - "N":"USDT", // Commission Asset, will not push if no commission - "n":"0", // Commission, will not push if no commission - "T":1568879465650, // Order Trade Time - "t":0, // Trade Id - "b":"0", // Bids Notional - "a":"9.91", // Ask Notional - "m":false, // Is this trade the maker side? - "R":false, // Is this reduce only - "wt":"CONTRACT_PRICE", // Stop Price Working Type - "ot":"TRAILING_STOP_MARKET",// Original Order Type - "ps":"LONG", // Position Side - "cp":false, // If Close-All, pushed with conditional order - "AP":"7476.89", // Activation Price, only puhed with TRAILING_STOP_MARKET order - "cr":"5.0", // Callback Rate, only puhed with TRAILING_STOP_MARKET order - "pP": false, // If price protection is turned on - "si": 0, // ignore - "ss": 0, // ignore - "rp":"0", // Realized Profit of the trade - "V":"EXPIRE_TAKER", // STP mode - "pm":"OPPONENT", // Price match mode - "gtd":0 // TIF GTD order auto cancel time + "s":"BTCUSDT", + "c":"TEST", + "S":"SELL", + "o":"TRAILING_STOP_MARKET", + "f":"GTC", + "q":"0.001", + "p":"0", + "ap":"0", + "sp":"7103.04", + "x":"NEW", + "X":"NEW", + "i":8886774, + "l":"0", + "z":"0", + "L":"0", + "N":"USDT", + "n":"0", + "T":1568879465650, + "t":0, + "b":"0", + "a":"9.91", + "m":false, + "R":false, + "wt":"CONTRACT_PRICE", + "ot":"TRAILING_STOP_MARKET", + "ps":"LONG", + "cp":false, + "AP":"7476.89", + "cr":"5.0", + "pP": false, + "si": 0, + "ss": 0, + "rp":"0", + "V":"EXPIRE_TAKER", + "pm":"OPPONENT", + "gtd":0 } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/PartialBook.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/PartialBook.txt index 8ad8cab92..c54148308 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/PartialBook.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/PartialBook.txt @@ -5,17 +5,17 @@ "stream": "btcusdt@depth5@100ms", "data": { - "e": "depthUpdate", // Event type - "E": 1571889248277, // Event time - "T": 1571889248276, // Transaction time + "e": "depthUpdate", + "E": 1571889248277, + "T": 1571889248276, "s": "BTCUSDT", "U": 390497796, "u": 390497878, "pu": 390497794, - "b": [ // Bids to be updated + "b": [ [ - "7403.89", // Price Level to be - "0.002" // Quantity + "7403.89", + "0.002" ], [ "7403.90", @@ -34,10 +34,10 @@ "2.562" ] ], - "a": [ // Asks to be updated + "a": [ [ - "7405.96", // Price level to be - "3.340" // Quantity + "7405.96", + "3.340" ], [ "7406.63", diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/StrategyUpdate.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/StrategyUpdate.txt index 667de0810..7a76a7256 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/StrategyUpdate.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/StrategyUpdate.txt @@ -5,16 +5,16 @@ "stream": "123", "data": { - "e": "STRATEGY_UPDATE", // Event Type - "T": 1669261797627, // Transaction Time - "E": 1669261797628, // Event Time + "e": "STRATEGY_UPDATE", + "T": 1669261797627, + "E": 1669261797628, "su": { - "si": 176054594, // Strategy ID - "st": "GRID", // Strategy Type - "ss": "NEW", // Strategy Status - "s": "BTCUSDT", // Symbol - "ut": 1669261797627, // Update Time - "c": 8007 // opCode + "si": 176054594, + "st": "GRID", + "ss": "NEW", + "s": "BTCUSDT", + "ut": 1669261797627, + "c": 8007 } } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/SymbolUpdates.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/SymbolUpdates.txt index 9a39519ca..a2d29b440 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/SymbolUpdates.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/SymbolUpdates.txt @@ -5,23 +5,23 @@ "stream": "!contractInfo", "data": { - "e":"contractInfo", // Event Type - "E":1669356423908, // Event Time - "s":"IOTAUSDT", // Symbol - "ps":"IOTAUSDT", // Pair - "ct":"PERPETUAL", // Contract type - "dt":4133404800000, // Delivery date time - "ot":1569398400000, // onboard date time - "cs":"TRADING", // Contract status + "e":"contractInfo", + "E":1669356423908, + "s":"IOTAUSDT", + "ps":"IOTAUSDT", + "ct":"PERPETUAL", + "dt":4133404800000, + "ot":1569398400000, + "cs":"TRADING", "bks":[ { - "bs":1, // Notional bracket - "bnf":0, // Floor notional of this bracket - "bnc":5000, // Cap notional of this bracket - "mmr":0.01, // Maintenance ratio for this bracket - "cf":0, // Auxiliary number for quick calculation - "mi":21, // Min leverage for this bracket - "ma":50 // Max leverage for this bracket + "bs":1, + "bnf":0, + "bnc":5000, + "mmr":0.01, + "cf":0, + "mi":21, + "ma":50 }, { "bs":2, diff --git a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Ticker.txt b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Ticker.txt index 65760c56b..966e180a5 100644 --- a/Binance.Net.UnitTests/Subscriptions/UsdFutures/Ticker.txt +++ b/Binance.Net.UnitTests/Subscriptions/UsdFutures/Ticker.txt @@ -5,23 +5,23 @@ "stream": "btcusdt@ticker", "data": { - "e": "24hrTicker", // Event type - "E": 123456789, // Event time - "s": "BTCUSDT", // Symbol - "p": "0.0015", // Price change - "P": "250.00", // Price change percent - "w": "0.0018", // Weighted average price - "c": "0.0025", // Last price - "Q": "10", // Last quantity - "o": "0.0010", // Open price - "h": "0.0025", // High price - "l": "0.0010", // Low price - "v": "10000", // Total traded base asset volume - "q": "18", // Total traded quote asset volume - "O": 0, // Statistics open time - "C": 86400000, // Statistics close time - "F": 0, // First trade ID - "L": 18150, // Last trade Id - "n": 18151 // Total number of trades + "e": "24hrTicker", + "E": 123456789, + "s": "BTCUSDT", + "p": "0.0015", + "P": "250.00", + "w": "0.0018", + "c": "0.0025", + "Q": "10", + "o": "0.0010", + "h": "0.0025", + "l": "0.0010", + "v": "10000", + "q": "18", + "O": 0, + "C": 86400000, + "F": 0, + "L": 18150, + "n": 18151 } } \ No newline at end of file diff --git a/Binance.Net.UnitTests/TestImplementations/JsonToObjectComparer.cs b/Binance.Net.UnitTests/TestImplementations/JsonToObjectComparer.cs deleted file mode 100644 index ee5314379..000000000 --- a/Binance.Net.UnitTests/TestImplementations/JsonToObjectComparer.cs +++ /dev/null @@ -1,369 +0,0 @@ -using CryptoExchange.Net.Converters; -using CryptoExchange.Net.Converters.JsonNet; -using CryptoExchange.Net.Objects; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using NUnit.Framework; -using NUnit.Framework.Legacy; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; - -namespace Binance.Net.UnitTests.TestImplementations -{ - public class JsonToObjectComparer - { - private Func _clientFunc; - - public JsonToObjectComparer(Func getClient) - { - _clientFunc = getClient; - } - - public async Task ProcessSubject( - string folderPrefix, - Func getSubject, - string[] parametersToSetNull = null, - Dictionary useNestedJsonPropertyForCompare = null, - Dictionary> ignoreProperties = null) - { - var listener = new EnumValueTraceListener(); - Trace.Listeners.Add(listener); - - var methods = typeof(K).GetMethods(); - var callResultMethods = methods.Where(m => m.Name.EndsWith("Async")).ToList(); - var skippedMethods = new List(); - - foreach (var method in callResultMethods) - { - for (var i = 0; i < 10; i++) - { - var path = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName; - FileStream file = null; - try - { - file = File.OpenRead(Path.Combine(path, $"JsonResponses", folderPrefix, $"{method.Name}{(i == 0 ? "": i.ToString())}.txt")); - } - catch (FileNotFoundException) - { - if(i == 0) - skippedMethods.Add(method.Name); - break; - } - - var buffer = new byte[file.Length]; - await file.ReadAsync(buffer, 0, buffer.Length); - file.Close(); - - var json = Encoding.UTF8.GetString(buffer); - var client = _clientFunc(json); - - var parameters = method.GetParameters(); - var input = new List(); - foreach (var parameter in parameters) - { - if (parametersToSetNull?.Contains(parameter.Name) == true) - input.Add(null); - else - input.Add(TestHelpers.GetTestValue(parameter.ParameterType, 1)); - } - - // act - CallResult result = (CallResult)await TestHelpers.InvokeAsync(method, getSubject(client), input.ToArray()); - - // asset - ClassicAssert.Null(result.Error, method.Name); - - var dataProperty = result.GetType().GetProperty("Data", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance); - if (dataProperty == null) - continue; - var resultData = dataProperty.GetValue(result); - ProcessData(method.Name + (i == 0 ? "" : i.ToString()), resultData, json, parametersToSetNull, useNestedJsonPropertyForCompare, ignoreProperties); - } - } - - if (skippedMethods.Any()) - Debug.WriteLine("Skipped methods:"); - foreach(var method in skippedMethods) - Debug.WriteLine(method); - - Trace.Listeners.Remove(listener); - } - - internal static void ProcessData(string method, object resultData, string json, string[] parametersToSetNull = null, - Dictionary useNestedJsonPropertyForCompare = null, - Dictionary> ignoreProperties = null) - { - var resultProperties = resultData.GetType().GetProperties().Select(p => (p, (JsonPropertyAttribute)p.GetCustomAttributes(typeof(JsonPropertyAttribute), true).SingleOrDefault())); - var jsonObject = JToken.Parse(json); - if (useNestedJsonPropertyForCompare?.ContainsKey(method) == true) - { - jsonObject = jsonObject[useNestedJsonPropertyForCompare[method]]; - } - - if (resultData.GetType().GetInterfaces().Contains(typeof(IDictionary))) - { - var dict = (IDictionary)resultData; - var jObj = (JObject)jsonObject; - var properties = jObj.Properties(); - foreach (var dictProp in properties) - { - if (!dict.Contains(dictProp.Name)) - throw new Exception($"{method}: Dictionary has no value for {dictProp.Name} while input json `{dictProp.Name}` has value {dictProp.Value}"); - - if (dictProp.Value.Type == JTokenType.Object) - { - // TODO Some additional checking for objects - foreach (var prop in ((JObject)dictProp.Value).Properties()) - CheckObject(method, prop, dict[dictProp.Name], ignoreProperties); - } - else - { - if (dict[dictProp.Name] == default && dictProp.Value.Type != JTokenType.Null) - { - // Property value not correct - throw new Exception($"{method}: Dictionary entry `{dictProp.Name}` has no value while input json has value {dictProp.Value}"); - } - } - } - } - else if (jsonObject.Type == JTokenType.Array) - { - var jObjs = (JArray)jsonObject; - var list = (IEnumerable)resultData; - var enumerator = list.GetEnumerator(); - foreach (var jObj in jObjs) - { - enumerator.MoveNext(); - if (jObj.Type == JTokenType.Object) - { - foreach (var subProp in ((JObject)jObj).Properties()) - { - if (ignoreProperties?.ContainsKey(method) == true && ignoreProperties[method].Contains(subProp.Name)) - continue; - CheckObject(method, subProp, enumerator.Current, ignoreProperties); - } - } - else if (jObj.Type == JTokenType.Array) - { - var resultObj = enumerator.Current; - var resultProps = resultObj.GetType().GetProperties().Select(p => (p, p.GetCustomAttributes(typeof(ArrayPropertyAttribute), true).Cast().SingleOrDefault())); - var arrayConverterProperty = resultObj.GetType().GetCustomAttributes(typeof(JsonConverterAttribute), true).FirstOrDefault(); - var jsonConverter = (arrayConverterProperty as JsonConverterAttribute).ConverterType; - if (jsonConverter != typeof(ArrayConverter)) - // Not array converter? - continue; - - int i = 0; - foreach (var item in jObj.Values()) - { - var arrayProp = resultProps.SingleOrDefault(p => p.Item2.Index == i).p; - if (arrayProp != null) - { - CheckPropertyValue(method, item, arrayProp.GetValue(resultObj), arrayProp.Name, "Array index " + i, arrayProp, ignoreProperties); - } - i++; - } - } - else - { - var value = enumerator.Current; - if (value == default && ((JValue)jObj).Type != JTokenType.Null) - { - throw new Exception($"{method}: Array has no value while input json array has value {jObj}"); - } - } - } - } - else - { - foreach (var item in jsonObject) - { - if (item is JProperty prop) - { - if (ignoreProperties?.ContainsKey(method) == true && ignoreProperties[method].Contains(prop.Name)) - continue; - - CheckObject(method, prop, resultData, ignoreProperties); - } - } - } - - Debug.WriteLine($"Successfully validated {method}"); - } - - private static void CheckObject(string method, JProperty prop, object obj, Dictionary> ignoreProperties) - { - var resultProperties = obj.GetType().GetProperties().Select(p => (p, (JsonPropertyAttribute)p.GetCustomAttributes(typeof(JsonPropertyAttribute), true).SingleOrDefault())); - - // Property has a value - var property = resultProperties.SingleOrDefault(p => p.Item2?.PropertyName == prop.Name).p; - property ??= resultProperties.SingleOrDefault(p => p.p.Name == prop.Name).p; - property ??= resultProperties.SingleOrDefault(p => p.p.Name.ToUpperInvariant() == prop.Name.ToUpperInvariant()).p; - - if (property is null) - { - // Property not found - throw new Exception($"{method}: Missing property `{prop.Name}` on `{obj.GetType().Name}`"); - } - - var propertyValue = property.GetValue(obj); - if(property.GetCustomAttribute(true)?.ItemConverterType == null) - CheckPropertyValue(method, prop.Value, propertyValue, property.Name, prop.Name, property, ignoreProperties); - } - - private static void CheckPropertyValue(string method, JToken propValue, object propertyValue, string propertyName = null, string propName = null, PropertyInfo info = null, Dictionary> ignoreProperties = null) - { - if (propertyValue == default && propValue.Type != JTokenType.Null && !string.IsNullOrEmpty(propValue.ToString())) - { - // Property value not correct - if (propValue.ToString() != "0") - throw new Exception($"{method}: Property `{propertyName}` has no value while input json `{propName}` has value {propValue}"); - } - - if (propertyValue == default && (propValue.Type == JTokenType.Null || string.IsNullOrEmpty(propValue.ToString())) || propValue.ToString() == "0") - return; - - if (propertyValue.GetType().GetInterfaces().Contains(typeof(IDictionary))) - { - var dict = (IDictionary)propertyValue; - var jObj = (JObject)propValue; - var properties = jObj.Properties(); - foreach (var dictProp in properties) - { - if (!dict.Contains(dictProp.Name)) - throw new Exception($"{method}: Property `{propertyName}` has no value while input json `{propName}` has value {propValue}"); - - if (dictProp.Value.Type == JTokenType.Object) - { - // TODO Some additional checking for objects - } - else - { - if (dict[dictProp.Name] == default && dictProp.Value.Type != JTokenType.Null) - { - // Property value not correct - throw new Exception($"{method}: Dictionary entry `{dictProp.Name}` has no value while input json has value {propValue} for"); - } - } - } - } - else if (propertyValue.GetType().GetInterfaces().Contains(typeof(IEnumerable)) - && propertyValue.GetType() != typeof(string)) - { - var jObjs = (JArray)propValue; - var list = (IEnumerable)propertyValue; - var enumerator = list.GetEnumerator(); - foreach (JToken jtoken in jObjs) - { - enumerator.MoveNext(); - var typeConverter = enumerator.Current.GetType().GetCustomAttributes(typeof(JsonConverterAttribute), true); - if (typeConverter.Any() && ((JsonConverterAttribute)typeConverter.First()).ConverterType != typeof(ArrayConverter)) - // Custom converter for the type, skip - continue; - - if (jtoken.Type == JTokenType.Object) - { - foreach (var subProp in ((JObject)jtoken).Properties()) - { - if (ignoreProperties?.ContainsKey(method) == true && ignoreProperties[method].Contains(subProp.Name)) - continue; - - CheckObject(method, subProp, enumerator.Current, ignoreProperties); - } - } - else if (jtoken.Type == JTokenType.Array) - { - var resultObj = enumerator.Current; - var resultProps = resultObj.GetType().GetProperties().Select(p => (p, p.GetCustomAttributes(typeof(ArrayPropertyAttribute), true).Cast().SingleOrDefault())); - var arrayConverterProperty = resultObj.GetType().GetCustomAttributes(typeof(JsonConverterAttribute), true).FirstOrDefault(); - var jsonConverter = (arrayConverterProperty as JsonConverterAttribute).ConverterType; - if (jsonConverter != typeof(ArrayConverter)) - // Not array converter? - continue; - - int i = 0; - foreach (var item in jtoken.Values()) - { - var arrayProp = resultProps.SingleOrDefault(p => p.Item2.Index == i).p; - if (arrayProp != null) - CheckPropertyValue(method, item, arrayProp.GetValue(resultObj), arrayProp.Name, "Array index " + i, arrayProp, ignoreProperties); - - i++; - } - } - else - { - var value = enumerator.Current; - if (value == default && ((JValue)jtoken).Type != JTokenType.Null) - { - throw new Exception($"{method}: Property `{propertyName}` has no value while input json `{propName}` has value {jtoken}"); - } - - CheckValues(method, propertyName, (JValue)jtoken, value); - } - } - } - else - { - if (propValue.Type == JTokenType.Object) - { - foreach (var item in propValue) - { - if (item is JProperty prop) - { - if (ignoreProperties?.ContainsKey(method) == true && ignoreProperties[method].Contains(prop.Name)) - continue; - - CheckObject(method, prop, propertyValue, ignoreProperties); - } - } - } - else - { - if (info.GetCustomAttribute(true) == null - && info.GetCustomAttribute(true)?.ItemConverterType == null) - { - CheckValues(method, propertyName, (JValue)propValue, propertyValue); - } - } - } - } - - private static void CheckValues(string method, string property, JValue jsonValue, object objectValue) - { - if (jsonValue.Type == JTokenType.String) - { - if(objectValue is decimal dec) - { - if(jsonValue.Value() != dec) - throw new Exception($"{method}: {property} not equal: {jsonValue.Value()} vs {dec}"); - } - else if(objectValue is DateTime time) - { - // timestamp, hard to check.. - } - else if (jsonValue.Value().ToLowerInvariant() != objectValue.ToString().ToLowerInvariant()) - { - throw new Exception($"{method}: {property} not equal: {jsonValue.Value()} vs {objectValue.ToString()}"); - } - } - else if (jsonValue.Type == JTokenType.Integer) - { - if (jsonValue.Value() != Convert.ToInt64(objectValue)) - throw new Exception($"{method}: {property} not equal: {jsonValue.Value()} vs {Convert.ToInt64(objectValue)}"); - } - else if (jsonValue.Type == JTokenType.Boolean) - { - if (jsonValue.Value() != (bool)objectValue) - throw new Exception($"{method}: {property} not equal: {jsonValue.Value()} vs {(bool)objectValue}"); - } - } - } -} diff --git a/Binance.Net.UnitTests/TestImplementations/TestHelpers.cs b/Binance.Net.UnitTests/TestImplementations/TestHelpers.cs index 51a89c201..70d7b5bea 100644 --- a/Binance.Net.UnitTests/TestImplementations/TestHelpers.cs +++ b/Binance.Net.UnitTests/TestImplementations/TestHelpers.cs @@ -7,6 +7,7 @@ using System.Net.Http; using System.Reflection; using System.Text; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Binance.Net.Clients; @@ -17,7 +18,6 @@ using CryptoExchange.Net.Objects.Sockets; using Microsoft.Extensions.Logging; using Moq; -using Newtonsoft.Json; namespace Binance.Net.UnitTests.TestImplementations { @@ -97,7 +97,7 @@ public static IBinanceRestClient CreateResponseClient(string response, Action(T response, Action options = null) { var client = (BinanceRestClient)CreateClient(options); - SetResponse(client, JsonConvert.SerializeObject(response)); + SetResponse(client, JsonSerializer.Serialize(response)); return client; } diff --git a/Binance.Net.UnitTests/TestImplementations/TestSocket.cs b/Binance.Net.UnitTests/TestImplementations/TestSocket.cs index 3db47c6c3..b803555ac 100644 --- a/Binance.Net.UnitTests/TestImplementations/TestSocket.cs +++ b/Binance.Net.UnitTests/TestImplementations/TestSocket.cs @@ -3,10 +3,10 @@ using System.Net.WebSockets; using System.Security.Authentication; using System.Text; +using System.Text.Json; using System.Threading.Tasks; using CryptoExchange.Net.Interfaces; using CryptoExchange.Net.Objects; -using Newtonsoft.Json; namespace Binance.Net.UnitTests.TestImplementations { @@ -101,7 +101,7 @@ public void InvokeMessage(string data) public void InvokeMessage(T data) { - OnStreamMessage?.Invoke(WebSocketMessageType.Text, new ReadOnlyMemory(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(data)))).Wait(); + OnStreamMessage?.Invoke(WebSocketMessageType.Text, new ReadOnlyMemory(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(data)))).Wait(); } public void SetProxy(ApiProxy proxy) diff --git a/Binance.Net/Binance.Net.csproj b/Binance.Net/Binance.Net.csproj index 6935bf6c1..61a35c409 100644 --- a/Binance.Net/Binance.Net.csproj +++ b/Binance.Net/Binance.Net.csproj @@ -48,7 +48,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Binance.Net/Binance.Net.xml b/Binance.Net/Binance.Net.xml index 44f865f39..a80cbcf34 100644 --- a/Binance.Net/Binance.Net.xml +++ b/Binance.Net/Binance.Net.xml @@ -700,7 +700,7 @@ - + @@ -721,16 +721,16 @@ - + - + - + @@ -739,7 +739,7 @@ - + @@ -988,7 +988,7 @@ - + @@ -1316,6 +1316,9 @@ + + + @@ -1902,7 +1905,7 @@ - + @@ -1950,6 +1953,12 @@ + + + + + + @@ -2112,6 +2121,9 @@ + + + Client providing access to the Binance Usd futures websocket Api @@ -2236,6 +2248,9 @@ + + + Account source @@ -2411,6 +2426,71 @@ Trade group 27 + + + Trade group 28 + + + + + Trade group 29 + + + + + Trade group 30 + + + + + Trade group 31 + + + + + Trade group 32 + + + + + Trade group 33 + + + + + Trade group 34 + + + + + Trade group 35 + + + + + Trade group 36 + + + + + Trade group 37 + + + + + Trade group 38 + + + + + Trade group 39 + + + + + Trade group 40 + + Account update reason @@ -2486,6 +2566,11 @@ Options Settle Profit + + + Auto exchange + + Coin swap withdraw @@ -2526,96 +2611,6 @@ Liquidation - - - Busd convert type - - - - - Auto convert when deposit - - - - - Auto convert when withdraw - - - - - In case withdraw failed - - - - - Convert via sapi call - - - - - Busd auto convert job - - - - - Mining earnings type - - - - - Mining wallet - - - - - Merged mining - - - - - Activity bonus - - - - - Rebate - - - - - Smart pool - - - - - Mining address - - - - - Pool savings - - - - - Transfered - - - - - Income transfer - - - - - Hashrate resale - mining wallet - - - - - Hashrate resale - pool savings - - Status of a blvt action @@ -2687,13 +2682,19 @@ - Spot + + Spot + - Futures USDT + + Futures USDT + - Futures Coin + + Futures Coin + @@ -2701,16 +2702,54 @@ - Init + + Init + - Process + + Process + - Success + + Success + - Failure + + Failure + + + + + Busd convert type + + + + + Auto convert when deposit + + + + + Auto convert when withdraw + + + + + In case withdraw failed + + + + + Convert via sapi call + + + + + Busd auto convert job + @@ -2912,6 +2951,66 @@ Ready for download + + + Mining earnings type + + + + + Mining wallet + + + + + Merged mining + + + + + Activity bonus + + + + + Rebate + + + + + Smart pool + + + + + Mining address + + + + + Pool savings + + + + + Transfered + + + + + Income transfer + + + + + Hashrate resale - mining wallet + + + + + Hashrate resale - pool savings + + The type of execution @@ -4337,59 +4436,54 @@ Interest - - - Sub account margin transfer type - - - + - Sub account spot to sub account margin + Sub Account Deposit Status - + - From sub account margin to sub account spot + Pending - + - Transfer type + Success - + - From main spot account to sub account + Credited but cannot withdraw - + - From sub account to main spot account + Sub account margin transfer type - + - Transfer type + Sub account spot to sub account margin - + - From sub account spot to sub account usdt-m futures + From sub account margin to sub account spot - + - From sub account usdt-m futures to sub account spot + Transfer type - + - From sub account spot to sub account coin-m futures + From main spot account to sub account - + - From sub account coin-m futures to sub account spot + From sub account to main spot account @@ -6466,7 +6560,7 @@ Cancellation token Transfer result - + Sub Account Transfer (Futures) You need to enable "internal transfer" option for the api key which requests this endpoint @@ -6502,7 +6596,7 @@ Cancellation token Transfer history - + Query Sub Account Transfer History (Futures) @@ -6517,7 +6611,7 @@ Cancellation token Transfer history - + Get Sub Account Deposit History Please notice the default startDate and endDate to make sure that time interval is within 0-7 days @@ -6548,7 +6642,7 @@ Cancellation token Rebates history - + Query Broker Futures Commission Rebate Record @@ -6615,7 +6709,7 @@ Cancellation token Asset info - + Query Sub Account Futures Asset info If subAccountId is not sent, the size must be sent @@ -7597,7 +7691,7 @@ Cancellation token Position risk - + Transfers from or to a futures sub account @@ -8703,6 +8797,16 @@ Cancellation token + + + Get current account commission rates. + + + Symbol + The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request + Cancellation token + + Binance Spot exchange data endpoints. Exchange data includes market data (tickers, order books, etc) and system status. @@ -10600,7 +10704,7 @@ - Gets account information + DEPRECATED; USE Trading.GetPositionsAsync INSTEAD Symbol @@ -10710,14 +10814,12 @@ Cancellation token - + - Gets account information, including balances - + Get account information, including position and balances + - The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request Cancellation token - The account information . @@ -10883,14 +10985,29 @@ Cancellation token - + - Binance USD-M futures exchange data endpoints. Exchange data includes market data (tickers, order books, etc) and system status. + Get user symbol configuration + + Filter by symbol + Cancellation token - + - Pings the Binance Futures API + Get user account configuration + + + Cancellation token + + + + Binance USD-M futures exchange data endpoints. Exchange data includes market data (tickers, order books, etc) and system status. + + + + + Pings the Binance Futures API Cancellation token @@ -11497,6 +11614,14 @@ Cancellation token + + + Get position information + + + Filter by symbol + Cancellation token + Binance USD futures streams @@ -14423,6 +14548,81 @@ Status + + + Binance commissions + + + + + Symbol name + + + + + Standard commission rates on trades from the order. + + + + + Tax commission rates for trades from the order. + + + + + Discount commission when paying in BNB + + + + + Commission info + + + + + Standard commission is reduced by this rate when paying commission in BNB. + + + + + Enabled for account + + + + + Enabled for symbol + + + + + Discount asset + + + + + Commission info + + + + + Maker fee + + + + + Taker fee + + + + + Buyer fee + + + + + Seller fee + + Spot symbol delist info @@ -14778,11 +14978,16 @@ The id of this update, can be synced with BinanceClient.Spot.GetOrderBook to update the order book - + Setter for last update id, need for Json.Net + + + The symbol of the order book + + Event type @@ -14793,14 +14998,14 @@ Event time of the update - + - Setter for bids (needed forJson.Net) + The list of bids - + - Setter for asks (needed forJson.Net) + The list of asks @@ -15055,7 +15260,7 @@ - PositionAmt + Position amount @@ -15264,11 +15469,6 @@ The result of placing a new order - - - The time the order was placed - - Rate limit info @@ -15454,11 +15654,6 @@ The result of placing a new order - - - The time the order was placed - - Trades for the order @@ -16037,9 +16232,9 @@ Allowed order types - + - Ice berg orders allowed + Iceberg orders allowed @@ -16092,6 +16287,11 @@ Permissions types + + + Permission sets + + Filters for order on this symbol @@ -16212,6 +16412,11 @@ The max factor the price can deviate down + + + The amount of minutes the average price of trades is calculated over. 0 means the last price is used + + The amount of minutes the average price of trades is calculated over. 0 means the last price is used @@ -17842,21 +18047,6 @@ Date - - - Futures type - - - - - USDT-Ⓜ Futures - - - - - COIN-Ⓜ Futures - - IP Restriction @@ -18144,26 +18334,6 @@ Tag - - - Sub Account Deposit Status - - - - - Pending - - - - - Success - - - - - Credited but cannot withdraw - - Sub Account Deposit Transaction @@ -18729,3389 +18899,2329 @@ Creation time - + - Adjust history + Isolated margin symbol info - + - Quantity + Symbol name - + - Collateral asset + Base asset - + - Asset + Quote asset - + - Pre adjustment rate + Margin trade - + - After adjustment rate + Is buy allowed - + - Direction + Is sell allowed - + - Status + Time at which the symbol gets delisted - + - Time of adjustment + Isolated margin transfer - + - Adjust result + Quantity of the transfer - + - Collateral asset + Transfer asset - + - Loan asset + Status of the transfer - + - The direction + Timestamp of the transfer - + - The quantity + Transaction id - + - The time + From - + - Max quantities + To - + - The max in amount + Result of creating isolated margin account - + - The max out amount + Success - + - After adjustment rate + Symbol - + - The rate after adjustment + Isolated margin account info - + - Borrow history + Account assets - + - Id + Total btc asset - + - Time of confirmation + Total liability - + - Asset + Total net asset - + - The collateral rate + Isolated margin account symbol - + - Total left + Base asset - + - Principal left + Quote asset - + - Dead line + Symbol name - + - Collateral asset + Isolated created - + - Collateral quantity + The margin level - + - The status of the transfer + Margin level status - + - Borrow result + Margin ratio - + - Id + Index price - + - The asset borrowed + Liquidate price - + - The asset used for collateral + Liquidate rate - + - The quantity borrowed + If trading is enabled - + - The collateral quantity + Account is enabled - + - The timestamp + Isolated margin account asset - + - Collateral info + Asset name - + - The loan asset + If borrow is enabled - + - The collateral asset + Borrowed - + - Rate + Free - + - Margin call collateral rate + Interest - + - Liquidation collateal rate + Locked - + - Current collateral rate + Net asset - + - Interest rate + Net asset in btc - + - In days + Is repay enabled - + - Interest history + Total asset - + - Collateral asset + Enabled account limit - + - Interest asset + Current enabled accounts - + - Interest + Max accounts - + - Interest free limit used + Loanable asset info - + - Principal interest + Loan asset - + - Time + Hourly interest rate for 7 days - + - Liquidation history + Daily interest rate for 7 days - + - Quantity for liquidation + Hourly interest rate for 14 days - + - Collateral asset + Daily interest rate for 14 days - + - Start time of liquidation + Daily interest rate for 30 days - + - Asset + Daily interest rate for 30 days - + - Rest collateral quantity after liquidation + Daily interest rate for 90 days - + - Rest loan quantity + Daily interest rate for 90 days - + - Status + Daily interest rate for 180 days - + - Repay history + Daily interest rate for 180 days - + - Id + Min limit - + - Time of confirmation + Min limit - + - Time of last update + Vip level - + - Asset + Borrow info - + - Collateral asset + The loaning asset - + - Quantity + The collateral asset - + - Released collateral quantity + The loan quantity - + - The status of the transfer + The collateral quantity - + - Repay type + Hourly interest rate - + - Collateral repayment + Borrow order id - + - Loan/collateral exchange rate + Borrow record - + - Repay result + The loaning asset - + - Id + The collateral asset - + - The asset borrowed + The loan quantity - + - The asset used for collateral + The collateral quantity - + - The quantity borrowed + Hourly interest rate - + - Cross colateral wallet info + Loan term - + - Total cross collateral + Borrow order id - + - Total borrowed + Borrow timestamp - + - Total interest + Status of the order - + - Interest free limit + Collateral asset info - + - The asset + Collateral asset - + - Cross collaterals + Initial ltv - + - Cross collateral data + Margin call ltv - + - Loan asset + Liquidation ltv - + - Collateral asset + Max limit - + - Quantity locked + Vip level - + - Loan quantity + Crypto loan income info - + - Current collateral rate + Asset - + - Used interest free limit + Income type - + - Principal interest + Quantity - + - Interest + Timestamp - + - Isolated margin symbol info + Transaction id - + - Symbol name + Adjust info - + - Base asset + The loaning asset - + - Quote asset + The collateral asset - + - Margin trade + Direction - + - Is buy allowed + Amount - + - Is sell allowed + Current ltv - + - Time at which the symbol gets delisted + Ltv adjustment info - + - Isolated margin transfer + The loaning asset - + - Quantity of the transfer + The collateral asset - + - Transfer asset + Direction - + - Status of the transfer + Amount - + - Timestamp of the transfer + Pre adjust ltv - + - Transaction id + Post adjust ltv - + - From + Adjust time - + - To + Order id - + - Result of creating isolated margin account + Customize margin call result - + - Success + Order id - + - Symbol + Collateral asset - + - Isolated margin account info + Pre margin call - + - Account assets + After margin call - + - Total btc asset + Timestamp - + - Total liability + Open borrow order info - + - Total net asset + The loaning asset - + - Isolated margin account symbol + The collateral asset - + - Base asset + The collateral quantity - + - Quote asset + Borrow order id - + - Symbol name + Total debt - + - Isolated created + Residual interest - + - The margin level + Current LTV - + - Margin level status + Expiration time - + - Margin ratio + Repay info - + - Index price + The loaning asset - + - Liquidate price + The collateral asset - + - Liquidate rate + Current LTV - + - If trading is enabled + Remaining principal - + - Account is enabled + Repay status - + - Isolated margin account asset + Remaining collateral - + - Asset name + Remaining interest - + - If borrow is enabled + Repay rate info - + - Borrowed + Loan asset - + - Free + Collateral asset - + - Interest + Repay quantity - + - Locked + Rate - + - Net asset + Repay record - + - Net asset in btc + The loaning asset - + - Is repay enabled + The collateral asset - + - Total asset + Borrow order id - + - Enabled account limit + Repay timestamp - + - Current enabled accounts + Status of the repay - + - Max accounts + Collateral return - + - Loanable asset info + Collateral used - + - Loan asset + Repay quantity - + - Hourly interest rate for 7 days + 1 for "repay with borrowed asset", 2 for "repay with collateral" - + - Daily interest rate for 7 days + Cross margin collateral info - + - Hourly interest rate for 14 days + Collaterals - + - Daily interest rate for 14 days + Asset names - + - Daily interest rate for 30 days + Collateral info - + - Daily interest rate for 30 days + Min usd value - + - Daily interest rate for 90 days + Max usd value - + - Daily interest rate for 90 days + Discount rate - + - Daily interest rate for 180 days + Result - + - Daily interest rate for 180 days + Success - + - Min limit + Forced liquidation info - + - Min limit + Average price - + - Vip level + The executed quantity - + - Borrow info + Order id - + - The loaning asset + Price - + - The collateral asset + Total quantity - + - The loan quantity + Side - + - The collateral quantity + Symbol - + - Hourly interest rate + Time in force - + - Borrow order id + Last update time - + - Borrow record + Is isolated margin - + - The loaning asset + Future hourly interest rate - + - The collateral asset + Asset - + - The loan quantity + Next interest rate - + - The collateral quantity + Interest history entry info - + - Hourly interest rate + Transaction id - + - Loan term + Isolated symbol - + - Borrow order id + The asset - + - Borrow timestamp + The raw asset - + - Status of the order + The quantity of interest - + - Collateral asset info + Timestamp - + - Collateral asset + Interest rate - + - Initial ltv + Principal - + - Margin call ltv + Type of interest - + - Liquidation ltv + Cross margin interest data - + - Max limit + Vip level - + - Vip level - + The coin + - + - Crypto loan income info + If coin can be transferred into cross - + - Asset - + If coin can be borrowed in cross + - + - Income type + The daily interest - + - Quantity + The yearly interest - + - Timestamp + The yearly interest - + - Transaction id + Cross marginable pairs for this coin - + - Adjust info + Interest rate history - + - The loaning asset + The asset - + - The collateral asset + The daily interest - + - Direction + Timestamp - + - Amount + Vip level - + - Current ltv + Fee data - + - Ltv adjustment info + Vip level - + - The loaning asset + Symbol - + - The collateral asset + Leverage - + - Direction + Data - + - Amount + Fee info - - - Pre adjust ltv - - - - - Post adjust ltv - - - - - Adjust time - - - - - Order id - - - - - Customize margin call result - - - - - Order id - - - - - Collateral asset - - - - - Pre margin call - - - - - After margin call - - - - - Timestamp - - - - - Open borrow order info - - - - - The loaning asset - - - - - The collateral asset - - - - - The collateral quantity - - - - - Borrow order id - - - - - Total debt - - - - - Residual interest - - - - - Current LTV - - - - - Expiration time - - - - - Repay info - - - - - The loaning asset - - - - - The collateral asset - - - - - Current LTV - - - - - Remaining principal - - - - - Repay status - - - - - Remaining collateral - - - - - Remaining interest - - - - - Repay rate info - - - - - Loan asset - - - - - Collateral asset - - - - - Repay quantity - - - - - Rate - - - - - Repay record - - - - - The loaning asset - - - - - The collateral asset - - - - - Borrow order id - - - - - Repay timestamp - - - - - Status of the repay - - - - - Collateral return - - - - - Collateral used - - - - - Repay quantity - - - - - 1 for "repay with borrowed asset", 2 for "repay with collateral" - - - - - Cross margin collateral info - - - - - Collaterals - - - - - Asset names - - - - - Collateral info - - - - - Min usd value - - - - - Max usd value - - - - - Discount rate - - - - - Result - - - - - Success - - - - - Forced liquidation info - - - - - Average price - - - - - The executed quantity - - - - - Order id - - - - - Price - - - - - Total quantity - - - - - Side - - - - - Symbol - - - - - Time in force - - - - - Last update time - - - - - Is isolated margin - - - - - Future hourly interest rate - - - - - Asset - - - - - Next interest rate - - - - - Interest history entry info - - - - - Transaction id - - - - - Isolated symbol - - - - - The asset - - - - - The raw asset - - - - - The quantity of interest - - - - - Timestamp - - - - - Interest rate - - - - - Principal - - - - - Type of interest - - - - - Cross margin interest data - - - - - Vip level - - - - - The coin - - - - - If coin can be transferred into cross - - - - - If coin can be borrowed in cross - - - - - The daily interest - - - - - The yearly interest - - - - - The yearly interest - - - - - Cross marginable pairs for this coin - - - - - Interest rate history - - - - - The asset - - - - - The daily interest - - - - - Timestamp - - - - - Vip level - - - - - Fee data - - - - - Vip level - - - - - Symbol - - - - - Leverage - - - - - Data - - - - - Fee info - - - - - Asset - - - - - Daily interest - - - - - Borrow limit - - - - - Isolated margin tier data - - - - - Average price - - - - - Tier - - - - - Effective multiple - - - - - Initial risk ratio - - - - - Liquidation risk ratio - - - - - Base asset max borrowable - - - - - Quote asset max borrowable - - - - - Information about margin account - - - - - Boolean indicating if this account can borrow - - - - - Boolean indicating if this account can trade - - - - - Boolean indicating if this account can transfer - - - - - Collateral margin level - - - - - Total collateral value in USDT - - - - - Aggregate level of margin - - - - - Aggregate total balance as BTC - - - - - Aggregate total liability balance of BTC - - - - - Aggregate total available net balance of BTC - - - - - Account type - - - - - Balance list - - - - - Information about an asset balance - - - - - The asset this balance is for - - - - - The quantity that was borrowed - - - - - The quantity that isn't locked in a trade - - - - - Fee to need pay by borrowed - - - - - The quantity that is currently locked in a trade - - - - - The quantity that is netAsset - - - - - The total balance of this asset (Available + Locked) - - - - - Margin account snapshot - - - - - Timestamp of the data - - - - - Account type the data is for - - - - - Snapshot data - - - - - Margin snapshot data - - - - - The margin level - - - - - Total BTC asset - - - - - Total BTC liability - - - - - Total net BTC asset - - - - - Assets - - - - - The result quantity of getting maxBorrowable or maxTransferable - - - - - The quantity - - - - - The borrow limit - - - - - Margin asset info - - - - - Full name of the asset - - - - - Short name of the asset - - - - - Is borrowable - - - - - Is mortgageable - - - - - Minimal quantity which can be borrowed - - - - - Minimal quantity which can be repaid - - - - - Time at which the asset gets delisted - - - - - Delist margin schedule - - - - - Delist time - - - - - Cross margin assets - - - - - Isolated margin symbols - - - - - Asset info for dust conversion - - - - - Total btc - - - - - Total bnb - - - - - Dribblet percentage - - - - - Details - - - - - Asset dust details - - - - - Asset - - - - - Asset full name - - - - - Quantity fee - - - - - To btc - - - - - To bnb - - - - - To bnb off exchange - - - - - Exchange - - - - - Margin dust transfer info - - - - - Total service charge - - - - - Total transfered - - - - - Transfer results - - - - - Transfer results - - - - - Quantity - - - - - Source asset - - - - - Timestamp - - - - - Service charge quantity - - - - - Transaction id - - - - - Transfered quantity - - - - - Personal margin level information - - - - - The level at which your margin level is considered normal. - - - - - The level at which you will be margin called (asked to deposit more funds) - - - - - The level at which your positions will be liquidated until your account balances - - - - - Oco info - - - - - Margin buy borrow quantity - - - - - Margin buy borrow asset - - - - - Is isolated margin - - - - - Margin pair info - - - - - Base asset of the pair - - - - - Quote asset of the pair - - - - - Id - - - - - Is buying allowed - - - - - Is selling allowed - - - - - Is margin trading - - - - - Symbol name - - - - - Time at which the symbol gets delisted - - - - - Price index for a symbol - - - - - Symbol - - - - - Price - - - - - Time of calculation - - - - - The result of transferring - - - - - The Transaction id as assigned by Binance - - - - - Loan info - - - - - Isolated symbol - - - - - The asset of the loan - - - - - The transaction id of the loan - - - - - Principal repaid - - - - - Interest repaid - - - - - Quantity repaid - - - - - Time of repay completed - - - - - The status of the loan - - - - - Repay info - - - - - Isolated symbol - - - - - The asset of the repay - - - - - The transaction id of the repay - ` - - - - Total quantity repaid - - - + - Interest repaid + Asset - + - Principal repaid + Daily interest - + - Time of repay completed + Borrow limit - + - The status of the repay + Isolated margin tier data - + - Small liability asset + Average price - + - Asset + Tier - + - Interest + Effective multiple - + - Principal + Initial risk ratio - + - Liability asset + Liquidation risk ratio - + - Liability quantity + Base asset max borrowable - + - Small liability history + Quote asset max borrowable - + - Asset + Information about margin account - + - Quantity + Boolean indicating if this account can borrow - + - Target asset + Boolean indicating if this account can trade - + - Target quantity + Boolean indicating if this account can transfer - + - Biz type + Collateral margin level - + - Timestamp + Total collateral value in USDT - + - Transfer history entry + Aggregate level of margin - + - Quanity of the transfer + Aggregate total balance as BTC - + - Asset of the transfer + Aggregate total liability balance of BTC - + - Status of the transfer + Aggregate total available net balance of BTC - + - Timestamp of the transaction + Account type - + - Transaction id + Balance list - + - Direction of the transfer + Information about an asset balance - + - Transfer from + The asset this balance is for - + - Transfer to + The quantity that was borrowed - + - Transfer from symbol + The quantity that isn't locked in a trade - + - Transfer to symbol + Fee to need pay by borrowed - + - Resale list + The quantity that is currently locked in a trade - + - Total number of results + The quantity that is netAsset - + - Page size + The total balance of this asset (Available + Locked) - + - Transfer details + Margin account snapshot - + - Resale item + Timestamp of the data - + - Config id + Account type the data is for - + - From user + Snapshot data - + - To user + Margin snapshot data - + - Algorithm + The margin level - + - Hash rate + Total BTC asset - + - Start day + Total BTC liability - + - Coin name + Total net BTC asset - + - Transferred income + Assets - + - Resale list + The result quantity of getting maxBorrowable or maxTransferable - + - Total number of results + The quantity - + - Page size + The borrow limit - + - Details + Margin asset info - + - Resale item + Full name of the asset - + - Mining id + Short name of the asset - + - From user + Is borrowable - + - To user + Is mortgageable - + - Algorithm + Minimal quantity which can be borrowed - + - Hash rate + Minimal quantity which can be repaid - + - Start day + Time at which the asset gets delisted - + - End day + Delist margin schedule - + - Status + Delist time - + - Miner list + Cross margin assets - + - Total number of entries + Isolated margin symbols - + - Page size + Asset info for dust conversion - + - Worker data + Total btc - + - Miner details + Total bnb - + - Worker id + Dribblet percentage - + - Worker name + Details - + - Status + Asset dust details - + - Hash rate + Asset - + - Day hash rate + Asset full name - + - Reject rate + Quantity fee - + - Last share time + To btc - + - Miner details + To bnb - + - Name of the worker + To bnb off exchange - + - Data type + Exchange - + - Hash rate data + Margin dust transfer info - + - Hash rate + Total service charge - + - Timestamp + Total transfered - + - Hashrate + Transfer results - + - Rejected + Transfer results - + - Mining account + Quantity - + - Type + Source asset - + - User name + Timestamp - + - Hash rates + Service charge quantity - + - Mining coin info + Transaction id - + - The name of the algorithm + Transfered quantity - + - The id of the algorithm + Personal margin level information - + - The pool index + The level at which your margin level is considered normal. - + - The unit of measurement + The level at which you will be margin called (asked to deposit more funds) - + - Mining coin info + The level at which your positions will be liquidated until your account balances - + - The name of the coin + Oco info - + - The id of the coin + Margin buy borrow quantity - + - The pool index + Margin buy borrow asset - + - Algorithm id + Is isolated margin - + - Algorithm name + Margin pair info - + - Earning info + Base asset of the pair - + - Total number of results + Quote asset of the pair - + - Page size + Id - + - Profit items + Is buying allowed - + - Earning info + Is selling allowed - + - Timestamp + Is margin trading - + - Coin + Symbol name - + - Earning type + Time at which the symbol gets delisted - + - Sub account id + Price index for a symbol - + - Mining account + Symbol - + - Quantity + Price - + - Mining statistics + Time of calculation - + - Hashrate last fifteen minutes + The result of transferring - + - Day hashrate + The Transaction id as assigned by Binance - + - Valid shares + Loan info - + - Invalid shares + Isolated symbol - + - Todays profit + The asset of the loan - + - Yesterdays profit + The transaction id of the loan - + - User name + Principal repaid - + - Hashrate unit + Interest repaid - + - Algorithm + Quantity repaid - + - Revenue list + Time of repay completed - + - Total number of results + The status of the loan - + - Page size + Repay info - + - Revenue items + Isolated symbol - + - Revenue + The asset of the repay - + - Timestamp - + The transaction id of the repay + ` - + - Coin + Total quantity repaid - + - Earning type + Interest repaid - + - Profit quantity + Principal repaid - + - Status + Time of repay completed - + - Revenue list + The status of the repay - + - Total number of results + Small liability asset - + - Page size + Asset - + - Revenue items + Interest - + - Revenue + Principal - + - Timestamp + Liability asset - + - Coin + Liability quantity - + - Earning type + Small liability history - + - Day hashrate + Asset - + - Profit quantity + Quantity - + - Hash transfer + Target asset - + - Transfer quantity + Target quantity - + - Status + Biz type - + - Portfolio margin collateral rate info + Timestamp - + - Asset + Transfer history entry - + - Collateral rate + Quanity of the transfer - + - Portfolio margin account info + Asset of the transfer - + - Portfolio margin account maintenance margin rate + Status of the transfer - + - Account equity, in USD + Timestamp of the transaction - + - Portfolio margin account actual equity, in USD + Transaction id - + - Portfolio margin account maintenance margin, in USD + Direction of the transfer - + - Account status + Transfer from - + - Account type + Transfer to - + - Bankruptcy loan info + Transfer from symbol - + - Asset + Transfer to symbol - + - Loan amount + Resale list - + - Customized fixed project position + Total number of results - + - Asset name + Page size - + - Can transfer + Transfer details - + - Create timestamp + Resale item - + - Duration + Config id - + - End time + From user - + - Interest + To user - + - Interest rate + Algorithm - + - Lot + Hash rate - + - Position id + Start day - + - Principal + Coin name - + - Project id + Transferred income - + - Project name + Resale list - + - Time of purchase + Total number of results - + - Redeem date + Page size - + - Start time + Details - + - Status + Resale item - + - Type + Mining id - + - Flexible product position + From user - + - Annual interest rate + To user - + - Asset + Algorithm - + - Average annual interest rate + Hash rate - + - Tier Average annual interest rate + Start day - + - Can redeem + End day - + - Daily interest rate + Status - + - Quantity free + Miner list - + - Quantity frozen + Total number of entries - + - Quantity locked + Page size - + - The product id + Worker data - + - The product name + Miner details - + - Redeeming quantity + Worker id - + - Quantity purchased today + Worker name - + - Total quantity + Status - + - Total interest + Hash rate - + - Interest record + Day hash rate - + - Interest + Reject rate - + - Asset name + Last share time - + - Timestamp + Miner details - + - Lending type + Name of the worker - + - Name of the product + Data type - + - Lending account + Hash rate data - + - Total quantity in btc + Hash rate - + - Total quantity in usdt + Timestamp - + - Total fixed quantity in btc + Hashrate - + - Total fixed quantity in usdt + Rejected - + - Total flexible in btc + Mining account - + - Total flexible in usdt + Type - + - Position amounts + User name - + - Lending position amount + Hash rates - + - Amount of the asset + Mining coin info - + - Amount in btc + The name of the algorithm - + - Amount in usdt + The id of the algorithm - + - Asset name + The pool index - + - Purchase result + The unit of measurement - + - The id of the purchase + Mining coin info - + - Success + The name of the coin - + - Time + The id of the coin - + - Purchase result + The pool index - + - The id of the purchase + Algorithm id - + - Binance project info + Algorithm name - + - The asset + Earning info - + - Display priority + Total number of results - + - Duration + Page size - + - Interest per lot + Profit items - + - Interest rate + Earning info - + - Lot size + Timestamp - + - Lots low limit + Coin - + - Lots purchased + Earning type - + - Lots upper limit + Sub account id - + - Max number of lots per user + Mining account - + - Needs know your customer + Quantity - + - Project id + Mining statistics - + - Project name + Hashrate last fifteen minutes - + - Status + Day hashrate - + - Type + Valid shares - + - Has area limitation + Invalid shares - + - Purchase quota left + Todays profit - + - The asset + Yesterdays profit - + - The quota left + User name - + - Purchase record + Hashrate unit - + - Quantity purchased + Algorithm - + - Asset name + Revenue list - + - Timestamp + Total number of results - + - Lending type + Page size - + - Lot + Revenue items - + - Name of the product + Revenue - + - Purchase id + Timestamp - + - Purchase status + Coin - + - Redemption quota left + Earning type - + - The asset + Profit quantity - + - Daily quota + Status - + - Left quota + Revenue list - + - Minimal redemption quantity + Total number of results - + - Redemption record + Page size - + - Quantity purchased + Revenue items - + - Asset name + Revenue - + Timestamp - + - Start time + Coin - + - Interest + Earning type - + - Redeem type + Day hashrate - + - Id of the project + Profit quantity - + - Name of the project + Hash transfer - + - Principal + Transfer quantity - + - Purchase status + Status - + - Savings product + Portfolio margin collateral rate info - + - The asset + Asset - + - Average annual interest rage + Collateral rate - + - Can purchase + Portfolio margin account info - + - Can redeem + Portfolio margin account maintenance margin rate - + - Daily interest per thousand + Account equity, in USD - + - Is featured + Portfolio margin account actual equity, in USD - + - Minimal quantity to purchase + Portfolio margin account maintenance margin, in USD - + - Product id + Account status - + - Purchased quantity + Account type - + - Status of the product + Bankruptcy loan info - + - Upper limit + Asset - + - Upper limit per user + Loan amount @@ -22996,362 +22106,102 @@ - Timestamp - - - - - Arrival timestamp - - - - - Rewards history - - - - - Asset - - - - - Amount - - - - - Status - - - - - Timestamp - - - - - BETH holding balance - - - - - Annual percentage rate - - - - - Eth staking account - - - - - Total profit in Beth - - - - - Last day profit in Beth - - - - - Staking history - - - - - Asset - - - - - Amount - - - - - Status - - - - - Timestamp - - - - - Eth staking quota - - - - - Staking quota left - - - - - Redemption quota left - - - - - Historical staking info - - - - - Position id - - - - - Timestamp - - - - - Asset - - - - - Project - - - - - Quantity - - - - - Lock period - - - - - Redemption date - - - - - Type - - - - - Status - - - - - Quota left - - - - - Quota left - - - - - Staking position info - - - - - Position id - - - - - Project id - - - - - Locked asset - - - - - Locked quantity - - - - - Purchase time - - - - - Lock period in days - - - - - Accrue days - - - - - Reward asset - - - - - Apy - - - - - Earned quantity - - - - - Rewards asset of extra staking type - - - - - Extra rewards Apy - - - - - Rewards of extra staking type, distribute when order expires - - - - - Next estimated interest payment - - - - - Next interest payment date - - - - - Interest cycle - - - - - Early redemption amount - - - - - Interest accrual end date - - - - - Redemption arrival time - - - - - Redemption interval + Timestamp - + - Quantity under redemption + Arrival timestamp - + - Arrival time of partial redemption amount of order + Rewards history - + - When it is true, early redemption can be operated + Asset - + - When it is true, auto staking can be operated + Amount - + - Order type + Status - + - Status + Timestamp - + - Staking product info + BETH holding balance - + - Project id + Annual percentage rate - + - Product details + Eth staking account - + - Product quota + Total profit in Beth - + - Staking product details + Last day profit in Beth - + - Lock up asset + Staking history - + - Reward asset + Asset - + - Duration in days + Amount - + - Renewable + Status - + - Apy + Timestamp - + - Staking product quota + Eth staking quota - + - Total Personal quota + Staking quota left - + - Minimum amount per order + Redemption quota left @@ -23364,16 +22214,6 @@ Successful - - - Staking result - - - - - Id of the position - - Sub account details @@ -24769,6 +23609,51 @@ Available for withdraw + + + Account configuration + + + + + Fee tier + + + + + Can trade + + + + + Can deposit + + + + + Can withdraw + + + + + Dual side position + + + + + Update time + + + + + Multi assets margin + + + + + Trade group id + + Information about an account @@ -24784,94 +23669,289 @@ Boolean indicating if this account can deposit - + + + Boolean indicating if this account can trade + + + + + Boolean indicating if this account can withdraw + + + + + Boolean indicating if this account is in multi asset mode + + + + + Trade group id + + + + + Fee tier + + + + + Maximum withdraw quantity + + + + + Information about an account positions + + + + + Total initial margin + + + + + Total maint margin + + + + + Total margin balance + + + + + Total open order initial margin + + + + + Total positional initial margin + + + + + Total unrealized profit + + + + + Total wallet balance + + + + + Total crossed wallet balance + + + + + Unrealized profit of crossed positions + + + + + Available balance + + + + + The time of account info was updated + + + + + Account info + + + + + Total initial margin + + + + + Total maintenance margin + + + + + Total wallet balance + + + + + Total unrealized profit + + + + + Total margin balance + + + + + Total position initial margin + + + + + Total open order initial margin + + + + + Total cross wallet balance + + + + + Total cross unrealized profit and loss + + + + + Available balance + + + + + Max withdraw quantity + + + + + Assets + + + + + Positions + + + + + Asset information + + + + + Asset + + + + + Wallet balance + + + + + Unrealized profit + + + + + Margin balance + + + + + Maintenance margin + + + + + Initial margin + + + - Boolean indicating if this account can trade + Position initial margin - + - Boolean indicating if this account can withdraw + Open order initial margin - + - Boolean indicating if this account is in multi asset mode + Cross wallet balance - + - Trade group id + Cross unrealized profit and loss - + - Fee tier + Available balance - + - Maximum withdraw quantity + Max withdraw quantity - + - Information about an account positions + Update time - + - Total initial margin + Position info - + - Total maint margin + Symbol - + - Total margin balance + Position side - + - Total open order initial margin + Position amount - + - Total positional initial margin + Unrealized profit - + - Total unrealized profit + Isolated margin - + - Total wallet balance + Notional - + - Total crossed wallet balance + Isolated wallet - + - Unrealized profit of crossed positions + Initial margin - + - Available balance + Maintenance margin - + - The time of account info was updated + Update time @@ -25542,14 +24622,9 @@ Symbol for the resulting income history, may be null if not associated with a trading pair - - - Type of income as string - - - Type of income + Type of income as string @@ -26124,7 +25199,7 @@ User's position mode - + true": Hedge Mode mode; "false": One-way Mode @@ -26201,7 +25276,7 @@ - The required margin percent + The required margin percentage @@ -26279,11 +25354,6 @@ The max price difference rate (from mark price) a market order can make - - - Currently Empty - - Allowed order time in force @@ -26414,126 +25484,6 @@ Auxiliary number for quick calculation - - - A filter for order placed on a symbol. Can be either a , , - - - - - The type of this filter - - - - - Price filter - - - - - The minimal price the order can be for - - - - - The max price the order can be for - - - - - The tick size of the price. The price can not have more precision as this and can only be incremented in steps of this. - - - - - Lot size filter - - - - - The minimal quantity of an order - - - - - The maximum quantity of an order - - - - - The tick size of the quantity. The quantity can not have more precision as this and can only be incremented in steps of this. - - - - - Market lot size filter - - - - - The minimal quantity of an order - - - - - The maximum quantity of an order - - - - - The tick size of the quantity. The quantity can not have more precision as this and can only be incremented in steps of this. - - - - - Max orders filter - - - - - The max number of orders for this symbol - - - - - Max algo orders filter - - - - - The max number of Algorithmic orders for this symbol - - - - - Price percentage filter - - - - - The max factor the price can deviate up - - - - - The max factor the price can deviate down - - - - - The amount of minutes the average price of trades is calculated over. 0 means the last price is used - - - - - Min notional filter - - - - - The minimal total quote quantity of an order. This is calculated by Price * Quantity. - - Trade info @@ -26891,6 +25841,141 @@ Max quantity + + + Position information + + + + + Symbol + + + + + Position side + + + + + Position amount + + + + + Entry price + + + + + Break even price + + + + + Mark price + + + + + Unrealized profit + + + + + Liquidation price + + + + + Isolated margin + + + + + Notional + + + + + Margin asset + + + + + Isolated wallet + + + + + Initial margin + + + + + Maintenance margin + + + + + Position initial margin + + + + + Open order initial margin + + + + + Auto deleverage + + + + + Bid notional + + + + + Ask notional + + + + + Update time + + + + + Symbol configuration + + + + + Symbol + + + + + Margin type + + + + + Is auto add margin + + + + + Leverage + + + + + Max notional value + + diff --git a/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApi.cs b/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApi.cs index 6c022735e..1335faf7c 100644 --- a/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApi.cs +++ b/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApi.cs @@ -70,6 +70,10 @@ internal BinanceRestClientCoinFuturesApi(ILogger logger, HttpClient? httpClient, protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials) => new BinanceAuthenticationProvider(credentials); + protected override IStreamMessageAccessor CreateAccessor() => new SystemTextJsonStreamMessageAccessor(); + + protected override IMessageSerializer CreateSerializer() => new SystemTextJsonMessageSerializer(); + /// public override string FormatSymbol(string baseAsset, string quoteAsset) => baseAsset.ToUpperInvariant() + quoteAsset.ToUpperInvariant(); diff --git a/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiAccount.cs b/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiAccount.cs index c5f177408..a78e6f8e7 100644 --- a/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiAccount.cs +++ b/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiAccount.cs @@ -77,9 +77,9 @@ public async Task> ChangeMar { var parameters = new ParameterCollection { - { "symbol", symbol }, - { "marginType", JsonConvert.SerializeObject(marginType, new FuturesMarginTypeConverter(false)) } + { "symbol", symbol } }; + parameters.AddEnum("marginType", marginType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "dapi/v1/marginType", BinanceExchange.RateLimiter.FuturesRest, 1, true); @@ -97,9 +97,9 @@ public async Task> ModifyPosit { { "symbol", symbol }, { "amount", quantity.ToString(CultureInfo.InvariantCulture) }, - { "type", JsonConvert.SerializeObject(type, new FuturesMarginChangeDirectionTypeConverter(false)) }, }; - parameters.AddOptionalParameter("positionSide", positionSide == null ? null : JsonConvert.SerializeObject(positionSide, new PositionSideConverter(false))); + parameters.AddEnum("type", type); + parameters.AddOptionalEnum("positionSide", positionSide); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "dapi/v1/positionMargin", BinanceExchange.RateLimiter.FuturesRest, 1, true); @@ -117,7 +117,7 @@ public async Task>> GetT var parameters = new ParameterCollection { { "pair", symbolPair }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } }; - + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -166,10 +165,10 @@ public async Task>> GetT limit?.ValidateIntBetween(nameof(limit), 1, 500); var parameters = new ParameterCollection { - { "pair", symbolPair }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } + { "pair", symbolPair } }; + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -189,10 +188,10 @@ public async Task>> GetG limit?.ValidateIntBetween(nameof(limit), 1, 500); var parameters = new ParameterCollection { - { "pair", symbolPair }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } + { "pair", symbolPair } }; + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -213,9 +212,9 @@ public async Task>> GetMarkPric var parameters = new ParameterCollection { { "symbol", symbol }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -276,8 +275,8 @@ public async Task>> GetKlinesAsync(stri limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { { "symbol", symbol }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -297,10 +296,10 @@ public async Task>> GetContinuousContra { limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { - { "pair", pair }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) }, - { "contractType", JsonConvert.SerializeObject(contractType, new ContractTypeConverter(false)) } + { "pair", pair } }; + parameters.AddEnum("interval", interval); + parameters.AddEnum("contractType", contractType); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -320,9 +319,9 @@ public async Task>> GetIndexPri { limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { - { "pair", pair }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } + { "pair", pair } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -389,11 +388,11 @@ public async Task>> GetBasisAsync limit?.ValidateIntBetween(nameof(limit), 1, 500); var parameters = new ParameterCollection { - { "pair", pair }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) }, - { "contractType", JsonConvert.SerializeObject(contractType, new ContractTypeConverter(false)) } + { "pair", pair } }; + parameters.AddEnum("period", period); + parameters.AddEnum("contractType", contractType); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); diff --git a/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiTrading.cs b/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiTrading.cs index 80e30d3b8..e0c6710f2 100644 --- a/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiTrading.cs +++ b/Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiTrading.cs @@ -3,6 +3,8 @@ using Binance.Net.Interfaces.Clients.CoinFuturesApi; using Binance.Net.Objects.Models.Futures; using CryptoExchange.Net.CommonObjects; +using System.Drawing; +using System.Text.Json; namespace Binance.Net.Clients.CoinFuturesApi { @@ -70,21 +72,22 @@ public async Task> PlaceOrderAsync( var parameters = new ParameterCollection() { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(type, new FuturesOrderTypeConverter(false)) } }; + + parameters.AddEnum("side", side); + parameters.AddEnum("type", type); parameters.AddOptionalParameter("quantity", quantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("newClientOrderId", clientOrderId); parameters.AddOptionalParameter("price", price?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("timeInForce", timeInForce == null ? null : JsonConvert.SerializeObject(timeInForce, new TimeInForceConverter(false))); - parameters.AddOptionalParameter("positionSide", positionSide == null ? null : JsonConvert.SerializeObject(positionSide, new PositionSideConverter(false))); + parameters.AddOptionalEnum("timeInForce", timeInForce); + parameters.AddOptionalEnum("positionSide", positionSide); parameters.AddOptionalParameter("stopPrice", stopPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("activationPrice", activationPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("callbackRate", callbackRate?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("workingType", workingType == null ? null : JsonConvert.SerializeObject(workingType, new WorkingTypeConverter(false))); + parameters.AddOptionalEnum("workingType", workingType); parameters.AddOptionalParameter("reduceOnly", reduceOnly?.ToString().ToLower()); parameters.AddOptionalParameter("closePosition", closePosition?.ToString().ToLower()); - parameters.AddOptionalParameter("newOrderRespType", orderResponseType == null ? null : JsonConvert.SerializeObject(orderResponseType, new OrderResponseTypeConverter(false))); + parameters.AddOptionalEnum("newOrderRespType", orderResponseType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("priceProtect", priceProtect?.ToString().ToUpper()); @@ -135,28 +138,28 @@ public async Task>>> P var orderParameters = new ParameterCollection() { { "symbol", order.Symbol }, - { "side", JsonConvert.SerializeObject(order.Side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(order.Type, new FuturesOrderTypeConverter(false)) }, { "newOrderRespType", "RESULT" } }; + orderParameters.AddEnum("side", order.Side); + orderParameters.AddEnum("type", order.Type); var clientOrderId = order.NewClientOrderId ?? ExchangeHelpers.AppendRandomString(_baseClient._brokerId, 32); orderParameters.AddOptionalParameter("quantity", order.Quantity?.ToString(CultureInfo.InvariantCulture)); orderParameters.AddOptionalParameter("newClientOrderId", clientOrderId); orderParameters.AddOptionalParameter("price", order.Price?.ToString(CultureInfo.InvariantCulture)); - orderParameters.AddOptionalParameter("timeInForce", order.TimeInForce == null ? null : JsonConvert.SerializeObject(order.TimeInForce, new TimeInForceConverter(false))); - orderParameters.AddOptionalParameter("positionSide", order.PositionSide == null ? null : JsonConvert.SerializeObject(order.PositionSide, new PositionSideConverter(false))); + orderParameters.AddOptionalEnum("timeInForce", order.TimeInForce); + orderParameters.AddOptionalEnum("positionSide", order.PositionSide); orderParameters.AddOptionalParameter("stopPrice", order.StopPrice?.ToString(CultureInfo.InvariantCulture)); orderParameters.AddOptionalParameter("activationPrice", order.ActivationPrice?.ToString(CultureInfo.InvariantCulture)); orderParameters.AddOptionalParameter("callbackRate", order.CallbackRate?.ToString(CultureInfo.InvariantCulture)); - orderParameters.AddOptionalParameter("workingType", order.WorkingType == null ? null : JsonConvert.SerializeObject(order.WorkingType, new WorkingTypeConverter(false))); + orderParameters.AddOptionalEnum("workingType", order.WorkingType); orderParameters.AddOptionalParameter("reduceOnly", order.ReduceOnly?.ToString().ToLower()); orderParameters.AddOptionalParameter("priceProtect", order.PriceProtect?.ToString().ToUpper()); parameterOrders[i] = orderParameters; i++; } - parameters.Add("batchOrders", JsonConvert.SerializeObject(parameterOrders)); + parameters.Add("batchOrders", JsonSerializer.Serialize(parameterOrders)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "dapi/v1/batchOrders", BinanceExchange.RateLimiter.FuturesRest, 5, true); @@ -374,7 +377,7 @@ public async Task>> GetForcedOrde var parameters = new ParameterCollection(); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("symbol", symbol); - parameters.AddOptionalParameter("autoCloseType", closeType.HasValue ? JsonConvert.SerializeObject(closeType, new AutoCloseTypeConverter(false)) : null); + parameters.AddOptionalEnum("autoCloseType", closeType); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); diff --git a/Binance.Net/Clients/CoinFuturesApi/BinanceSocketClientCoinFuturesApi.cs b/Binance.Net/Clients/CoinFuturesApi/BinanceSocketClientCoinFuturesApi.cs index 5b7e38f7e..89de866a9 100644 --- a/Binance.Net/Clients/CoinFuturesApi/BinanceSocketClientCoinFuturesApi.cs +++ b/Binance.Net/Clients/CoinFuturesApi/BinanceSocketClientCoinFuturesApi.cs @@ -63,6 +63,10 @@ internal BinanceSocketClientCoinFuturesApi(ILogger logger, BinanceSocketOptions protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials) => new BinanceAuthenticationProvider(credentials); + protected override IMessageSerializer CreateSerializer() => new SystemTextJsonMessageSerializer(); + + protected override IByteMessageAccessor CreateAccessor() => new SystemTextJsonByteMessageAccessor(); + /// public override string FormatSymbol(string baseAsset, string quoteAsset) => baseAsset.ToUpperInvariant() + quoteAsset.ToUpperInvariant(); @@ -71,9 +75,9 @@ protected override AuthenticationProvider CreateAuthenticationProvider(ApiCreden /// public override string? GetListenerIdentifier(IMessageAccessor message) { - var id = message.GetValue(_idPath); + var id = message.GetValue(_idPath); if (id != null) - return id; + return id.ToString(); return message.GetValue(_streamPath); } @@ -99,7 +103,7 @@ public async Task> SubscribeToKlineUpdatesAsync(I var result = data.Data.Data; onMessage(data.As(result).WithStreamId(data.Data.Stream).WithSymbol(data.Data.Data.Symbol)); }); - symbols = symbols.SelectMany(a => intervals.Select(i => a.ToLower(CultureInfo.InvariantCulture) + _klineStreamEndpoint + "_" + JsonConvert.SerializeObject(i, new KlineIntervalConverter(false)))).ToArray(); + symbols = symbols.SelectMany(a => intervals.Select(i => a.ToLower(CultureInfo.InvariantCulture) + _klineStreamEndpoint + "_" + EnumConverter.GetString(i))).ToArray(); return await SubscribeAsync( BaseAddress, symbols, handler, ct).ConfigureAwait(false); } @@ -152,10 +156,10 @@ public async Task> SubscribeToContinuousContractK var handler = new Action>>(data => onMessage(data.As(data.Data.Data).WithStreamId(data.Data.Stream).WithSymbol(data.Data.Data.Symbol))); pairs = pairs.Select(a => a.ToLower(CultureInfo.InvariantCulture) + "_" + - JsonConvert.SerializeObject(contractType, new ContractTypeConverter(false)).ToLower() + + EnumConverter.GetString(contractType).ToLower() + _continuousKlineStreamEndpoint + "_" + - JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false))).ToArray(); + EnumConverter.GetString(interval)).ToArray(); return await SubscribeAsync( BaseAddress, pairs, handler, ct).ConfigureAwait(false); } @@ -174,7 +178,7 @@ public async Task> SubscribeToIndexKlineUpdatesAs pairs = pairs.Select(a => a.ToLower(CultureInfo.InvariantCulture) + _indexKlineStreamEndpoint + "_" + - JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false))).ToArray(); + EnumConverter.GetString(interval)).ToArray(); return await SubscribeAsync( BaseAddress, pairs, handler, ct).ConfigureAwait(false); } @@ -193,7 +197,7 @@ public async Task> SubscribeToMarkPriceKlineUpdat symbols = symbols.Select(a => a.ToLower(CultureInfo.InvariantCulture) + _markKlineStreamEndpoint + "_" + - JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false))).ToArray(); + EnumConverter.GetString(interval)).ToArray(); return await SubscribeAsync( BaseAddress, symbols, handler, ct).ConfigureAwait(false); } diff --git a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApi.cs b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApi.cs index d08c1308f..bb8fae1a9 100644 --- a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApi.cs +++ b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApi.cs @@ -63,6 +63,10 @@ internal BinanceRestClientGeneralApi(ILogger logger, HttpClient? httpClient, Bin protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials) => new BinanceAuthenticationProvider(credentials); + protected override IStreamMessageAccessor CreateAccessor() => new SystemTextJsonStreamMessageAccessor(); + + protected override IMessageSerializer CreateSerializer() => new SystemTextJsonMessageSerializer(); + /// public override string FormatSymbol(string baseAsset, string quoteAsset) => baseAsset.ToUpperInvariant() + quoteAsset.ToUpperInvariant(); diff --git a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiBrokerage.cs b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiBrokerage.cs index c0cd0f707..2dbe4dcdc 100644 --- a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiBrokerage.cs +++ b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiBrokerage.cs @@ -359,13 +359,11 @@ public async Task> GetSubAccountM } /// - public async Task> GetSubAccountFuturesAssetInfoAsync(BinanceBrokerageFuturesType futuresType, + public async Task> GetSubAccountFuturesAssetInfoAsync(FuturesAccountType futuresType, string? subAccountId = null, int? page = null, int? size = null, int? receiveWindow = null, CancellationToken ct = default) { - var parameters = new Dictionary - { - {"futuresType", ((int)futuresType).ToString(CultureInfo.InvariantCulture)} - }; + var parameters = new ParameterCollection(); + parameters.AddEnum("futuresType", futuresType); parameters.AddOptionalParameter("subAccountId", subAccountId); parameters.AddOptionalParameter("page", page?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("size", size?.ToString(CultureInfo.InvariantCulture)); @@ -435,13 +433,13 @@ public async Task> TransferUnivers { asset.ValidateNotNull(nameof(asset)); - var parameters = new Dictionary - { - {"asset", asset}, - {"amount", quantity.ToString(CultureInfo.InvariantCulture)}, - {"fromAccountType", JsonConvert.SerializeObject(fromAccountType, new BrokerageAccountTypeConverter(false))}, - {"toAccountType", JsonConvert.SerializeObject(toAccountType, new BrokerageAccountTypeConverter(false))} - }; + var parameters = new ParameterCollection() + { + {"asset", asset}, + {"amount", quantity.ToString(CultureInfo.InvariantCulture)} + }; + parameters.AddEnum("fromAccountType", fromAccountType); + parameters.AddEnum("toAccountType", toAccountType); parameters.AddOptionalParameter("fromId", fromId); parameters.AddOptionalParameter("toId", toId); parameters.AddOptionalParameter("clientTranId", clientTransferId); @@ -491,17 +489,17 @@ public async Task> TransferAsync(s } /// - public async Task> TransferFuturesAsync(string asset, decimal quantity, BinanceBrokerageFuturesType futuresType, + public async Task> TransferFuturesAsync(string asset, decimal quantity, FuturesAccountType futuresType, string? fromId, string? toId, string? clientTransferId = null, int? receiveWindow = null, CancellationToken ct = default) { asset.ValidateNotNull(nameof(asset)); - var parameters = new Dictionary + var parameters = new ParameterCollection { {"asset", asset}, {"amount", quantity.ToString(CultureInfo.InvariantCulture)}, - {"futuresType", ((int)futuresType).ToString(CultureInfo.InvariantCulture)} }; + parameters.AddEnum("futuresType", futuresType); parameters.AddOptionalParameter("fromId", fromId); parameters.AddOptionalParameter("toId", toId); parameters.AddOptionalParameter("clientTranId", clientTransferId); @@ -533,16 +531,16 @@ public async Task /// public async Task> GetTransferFuturesHistoryAsync(string subAccountId, - BinanceBrokerageFuturesType futuresType, DateTime? startDate = null, DateTime? endDate = null, + FuturesAccountType futuresType, DateTime? startDate = null, DateTime? endDate = null, int? page = null, int? limit = null, string? clientTransferId = null, int? receiveWindow = null, CancellationToken ct = default) { subAccountId.ValidateNotNull(nameof(subAccountId)); - var parameters = new Dictionary + var parameters = new ParameterCollection() { - {"subAccountId", subAccountId}, - {"futuresType", ((int)futuresType).ToString(CultureInfo.InvariantCulture)} + {"subAccountId", subAccountId} }; + parameters.AddEnum("futuresType", futuresType); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startDate)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endDate)); parameters.AddOptionalParameter("page", page?.ToString(CultureInfo.InvariantCulture)); @@ -555,13 +553,13 @@ public async Task> Ge /// public async Task>> GetSubAccountDepositHistoryAsync(string? subAccountId = null, - string? asset = null, BinanceBrokerageSubAccountDepositStatus? status = null, DateTime? startDate = null, DateTime? endDate = null, + string? asset = null, SubAccountDepositStatus? status = null, DateTime? startDate = null, DateTime? endDate = null, int? limit = null, int? offset = null, int? receiveWindow = null, CancellationToken ct = default) { - var parameters = new Dictionary(); + var parameters = new ParameterCollection(); parameters.AddOptionalParameter("subAccountId", subAccountId); parameters.AddOptionalParameter("coin", asset); - parameters.AddOptionalParameter("status", status.HasValue ? ((int)status).ToString(CultureInfo.InvariantCulture) : null); + parameters.AddOptionalEnum("status", status); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startDate)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endDate)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -608,15 +606,15 @@ public async Task>> GetBrokerC } /// - public async Task>> GetBrokerFuturesCommissionRebatesHistoryAsync(BinanceBrokerageFuturesType futuresType, + public async Task>> GetBrokerFuturesCommissionRebatesHistoryAsync(FuturesAccountType futuresType, DateTime startDate, DateTime endDate, int? page = null, int? size = null, int? receiveWindow = null, CancellationToken ct = default) { - var parameters = new Dictionary + var parameters = new ParameterCollection { - {"futuresType", ((int)futuresType).ToString(CultureInfo.InvariantCulture)}, {"startTime", DateTimeConverter.ConvertToMilliseconds(startDate)!}, {"endTime", DateTimeConverter.ConvertToMilliseconds(endDate)!} }; + parameters.AddEnum("futuresType", futuresType); parameters.AddOptionalParameter("page", page?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("size", size?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); diff --git a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiFutures.cs b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiFutures.cs index d0cf49159..7e249075d 100644 --- a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiFutures.cs +++ b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiFutures.cs @@ -28,8 +28,8 @@ public async Task> TransferFuturesAccountAsync { { "asset", asset }, { "amount", quantity.ToString(CultureInfo.InvariantCulture) }, - { "type", JsonConvert.SerializeObject(transferType, new FuturesTransferTypeConverter(false)) } }; + parameters.AddEnum("type", transferType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "sapi/v1/futures/transfer", BinanceExchange.RateLimiter.SpotRestIp, 1, true); diff --git a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiLoans.cs b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiLoans.cs index d5a6715cf..7b61548e3 100644 --- a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiLoans.cs +++ b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiLoans.cs @@ -26,7 +26,7 @@ public async Task>> GetIncome { { "asset", asset } }; - parameters.AddOptionalParameter("type", type.HasValue ? JsonConvert.SerializeObject(type.Value, new LoanIncomeTypeConverter(false)) : null); + parameters.AddOptionalEnum("type", type); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); diff --git a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiMining.cs b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiMining.cs index 1850d21b6..b26c616ac 100644 --- a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiMining.cs +++ b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiMining.cs @@ -100,7 +100,7 @@ public async Task> GetMinerListAsync(string algo parameters.AddOptionalParameter("page", page?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("sortAscending", sortAscending == null ? null : sortAscending == true ? "1" : "0"); parameters.AddOptionalParameter("sortColumn", sortColumn); - parameters.AddOptionalParameter("workerStatus", workerStatus == null ? null : JsonConvert.SerializeObject(workerStatus, new MinerStatusConverter(false))); + parameters.AddOptionalEnum("workerStatus", workerStatus); var request = _definitions.GetOrCreate(HttpMethod.Get, "sapi/v1/mining/worker/list", BinanceExchange.RateLimiter.SpotRestIp, 5, true); var result = await _baseClient.SendAsync>(request, parameters, ct).ConfigureAwait(false); diff --git a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiSubAccount.cs b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiSubAccount.cs index 7704b6d15..5ab6d36ea 100644 --- a/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiSubAccount.cs +++ b/Binance.Net/Clients/GeneralApi/BinanceRestClientGeneralApiSubAccount.cs @@ -69,11 +69,11 @@ public async Task> TransferSubAccountAsync(Tra var parameters = new ParameterCollection { - { "fromAccountType", JsonConvert.SerializeObject(fromAccountType, new TransferAccountTypeConverter(false)) }, - { "toAccountType", JsonConvert.SerializeObject(toAccountType, new TransferAccountTypeConverter(false)) }, { "asset", asset }, { "amount", quantity.ToString(CultureInfo.InvariantCulture) } }; + parameters.AddEnum("fromAccountType", fromAccountType); + parameters.AddEnum("toAccountType", toAccountType); parameters.AddOptionalParameter("symbol", symbol); parameters.AddOptionalParameter("fromEmail", fromEmail); parameters.AddOptionalParameter("toEmail", toEmail); @@ -273,9 +273,9 @@ public async Task> GetSubAccoun var parameters = new ParameterCollection { { "email", email }, - { "futuresType", JsonConvert.SerializeObject(futuresAccountType, new FuturesAccountTypeConverter(false)) } }; + parameters.AddEnum("futuresType", futuresAccountType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Get, "sapi/v2/sub-account/futures/account", BinanceExchange.RateLimiter.SpotRestIp, 1, true); @@ -320,9 +320,8 @@ public async Task> GetSubA var parameters = new ParameterCollection { { "email", email }, - { "futuresType", JsonConvert.SerializeObject(futuresAccountType, new FuturesAccountTypeConverter(false)) } }; - + parameters.AddEnum("futuresType", futuresAccountType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Get, "sapi/v2/sub-account/futures/positionRisk", BinanceExchange.RateLimiter.SpotRestIp, 1, true); @@ -334,7 +333,7 @@ public async Task> GetSubA #region Futures Transfer for Sub-account (For Master Account) /// - public async Task> TransferSubAccountFuturesAsync(string email, string asset, decimal quantity, SubAccountFuturesTransferType type, int? receiveWindow = null, CancellationToken ct = default) + public async Task> TransferSubAccountFuturesAsync(string email, string asset, decimal quantity, FuturesTransferType type, int? receiveWindow = null, CancellationToken ct = default) { email.ValidateNotNull(nameof(email)); asset.ValidateNotNull(nameof(asset)); @@ -343,10 +342,9 @@ public async Task> TransferSubAccoun { { "email", email }, { "asset", asset }, - { "type", JsonConvert.SerializeObject(type, new SubAccountFuturesTransferTypeConverter(false)) }, { "amount", quantity.ToString(CultureInfo.InvariantCulture) } }; - + parameters.AddEnum("type", type); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "sapi/v1/sub-account/futures/transfer", BinanceExchange.RateLimiter.SpotRestIp, 1, true, parameterPosition: HttpMethodParameterPosition.InUri); @@ -366,10 +364,9 @@ public async Task> TransferSubAccoun { { "email", email }, { "asset", asset }, - { "type", JsonConvert.SerializeObject(type, new SubAccountMarginTransferTypeConverter(false)) }, { "amount", quantity.ToString(CultureInfo.InvariantCulture) } }; - + parameters.AddEnum("type", type); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "sapi/v1/sub-account/margin/transfer", BinanceExchange.RateLimiter.SpotRestIp, 1, true, parameterPosition: HttpMethodParameterPosition.InUri); @@ -426,7 +423,7 @@ public async Task { var parameters = new ParameterCollection(); parameters.AddOptionalParameter("asset", asset); - parameters.AddOptionalParameter("type", type == null ? null : JsonConvert.SerializeObject(type, new SubAccountTransferSubAccountTypeConverter(false))); + parameters.AddOptionalEnum("type", type); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); diff --git a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApi.cs b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApi.cs index a23669547..26905afba 100644 --- a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApi.cs +++ b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApi.cs @@ -71,6 +71,10 @@ internal BinanceRestClientSpotApi(ILogger logger, HttpClient? httpClient, Binanc protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials) => new BinanceAuthenticationProvider(credentials); + protected override IStreamMessageAccessor CreateAccessor() => new SystemTextJsonStreamMessageAccessor(); + + protected override IMessageSerializer CreateSerializer() => new SystemTextJsonMessageSerializer(); + /// public override string FormatSymbol(string baseAsset, string quoteAsset) => baseAsset.ToUpperInvariant() + quoteAsset.ToUpperInvariant(); @@ -120,22 +124,22 @@ internal async Task> PlaceOrderInternal(Uri ur string clientOrderId = newClientOrderId ?? ExchangeHelpers.AppendRandomString(_brokerId, 32); - var parameters = new Dictionary + var parameters = new ParameterCollection() { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(type, new SpotOrderTypeConverter(false)) } }; + parameters.AddEnum("side", side); + parameters.AddEnum("type", type); parameters.AddOptionalParameter("quantity", quantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("quoteOrderQty", quoteQuantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("newClientOrderId", clientOrderId); parameters.AddOptionalParameter("price", price?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("timeInForce", timeInForce == null ? null : JsonConvert.SerializeObject(timeInForce, new TimeInForceConverter(false))); + parameters.AddOptionalEnum("timeInForce", timeInForce); parameters.AddOptionalParameter("stopPrice", stopPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("icebergQty", icebergQty?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("sideEffectType", sideEffectType == null ? null : JsonConvert.SerializeObject(sideEffectType, new SideEffectTypeConverter(false))); + parameters.AddOptionalEnum("sideEffectType", sideEffectType); parameters.AddOptionalParameter("isIsolated", isIsolated); - parameters.AddOptionalParameter("newOrderRespType", orderResponseType == null ? null : JsonConvert.SerializeObject(orderResponseType, new OrderResponseTypeConverter(false))); + parameters.AddOptionalEnum("newOrderRespType", orderResponseType); parameters.AddOptionalParameter("trailingDelta", trailingDelta); parameters.AddOptionalParameter("strategyId", strategyId); parameters.AddOptionalParameter("strategyType", strategyType); diff --git a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiAccount.cs b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiAccount.cs index 55d7824a5..810aa9646 100644 --- a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiAccount.cs +++ b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiAccount.cs @@ -97,7 +97,7 @@ public async Task> WithdrawAsync(string a parameters.AddOptionalParameter("network", network); parameters.AddOptionalParameter("transactionFeeFlag", transactionFeeFlag); parameters.AddOptionalParameter("addressTag", addressTag); - parameters.AddOptionalParameter("walletType", walletType != null ? JsonConvert.SerializeObject(walletType, new WalletTypeConverter(false)) : null); + parameters.AddOptionalEnum("walletType", walletType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "sapi/v1/capital/withdraw/apply", BinanceExchange.RateLimiter.SpotRestUid, 600, true, parameterPosition: HttpMethodParameterPosition.InUri); @@ -113,7 +113,7 @@ public async Task>> GetWithdrawalHi var parameters = new ParameterCollection(); parameters.AddOptionalParameter("coin", asset); parameters.AddOptionalParameter("withdrawOrderId", withdrawOrderId); - parameters.AddOptionalParameter("status", status != null ? JsonConvert.SerializeObject(status, new WithdrawalStatusConverter(false)) : null); + parameters.AddOptionalEnum("status", status); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); @@ -149,7 +149,7 @@ public async Task>> GetDepositHistoryA parameters.AddOptionalParameter("coin", asset); parameters.AddOptionalParameter("offset", offset?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("status", status != null ? JsonConvert.SerializeObject(status, new DepositStatusConverter(false)) : null); + parameters.AddOptionalEnum("status", status); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); @@ -431,11 +431,11 @@ public async Task> TransferAsync(UniversalTran { var parameters = new ParameterCollection { - { "type", JsonConvert.SerializeObject(type, new UniversalTransferTypeConverter(false)) }, { "asset", asset }, { "amount", quantity.ToString(CultureInfo.InvariantCulture) } }; + parameters.AddEnum("type", type); parameters.AddOptionalParameter("fromSymbol", fromSymbol); parameters.AddOptionalParameter("toSymbol", toSymbol); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); @@ -449,10 +449,8 @@ public async Task> TransferAsync(UniversalTran /// public async Task>> GetTransfersAsync(UniversalTransferType type, DateTime? startTime = null, DateTime? endTime = null, int? page = null, int? pageSize = null, int? receiveWindow = null, CancellationToken ct = default) { - var parameters = new ParameterCollection - { - { "type", JsonConvert.SerializeObject(type, new UniversalTransferTypeConverter(false)) } - }; + var parameters = new ParameterCollection(); + parameters.AddEnum("type", type); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("current", page?.ToString(CultureInfo.InvariantCulture)); @@ -595,10 +593,8 @@ public async Task>> Ge { limit?.ValidateIntBetween(nameof(limit), 1, 100); - var parameters = new ParameterCollection - { - { "direction", JsonConvert.SerializeObject(direction, new TransferDirectionConverter(false)) } - }; + var parameters = new ParameterCollection(); + parameters.AddEnum("direction", direction); parameters.AddOptionalParameter("isolatedSymbol", isolatedSymbol); parameters.AddOptionalParameter("size", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("current", page?.ToString(CultureInfo.InvariantCulture)); @@ -1328,5 +1324,20 @@ public async Task> GetAccountVipLevelAnd } #endregion + + #region Get Trade Fee + + /// + public async Task> GetCommissionRatesAsync(string symbol, int? receiveWindow = null, CancellationToken ct = default) + { + var parameters = new ParameterCollection(); + parameters.Add("symbol", symbol); + parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); + + var request = _definitions.GetOrCreate(HttpMethod.Get, "api/v3/account/commission", BinanceExchange.RateLimiter.SpotRestIp, 20, true); + return await _baseClient.SendAsync(request, parameters, ct).ConfigureAwait(false); + } + + #endregion } } diff --git a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiExchangeData.cs b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiExchangeData.cs index de529d436..7f0f15596 100644 --- a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiExchangeData.cs +++ b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiExchangeData.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Text.Json; using Binance.Net.Converters; using Binance.Net.Enums; using Binance.Net.Interfaces; @@ -81,7 +83,7 @@ public async Task> GetExchangeInfoAsync(Accou list.Add(permission.ToString().ToUpper()); } - parameters.Add("permissions", JsonConvert.SerializeObject(list)); + parameters.Add("permissions", JsonSerializer.Serialize(list)); } else if (permissions.Any()) { @@ -106,7 +108,7 @@ public async Task> GetExchangeInfoAsync(IEnum if (symbols.Count() > 1) { - parameters.Add("symbols", JsonConvert.SerializeObject(symbols)); + parameters.Add("symbols", JsonSerializer.Serialize(symbols)); } else if (symbols.Any()) { @@ -246,8 +248,8 @@ public async Task>> GetKlinesAsync(stri limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { { "symbol", symbol }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -267,8 +269,8 @@ public async Task>> GetUiKlinesAsync(st limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { { "symbol", symbol }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -536,8 +538,8 @@ public async Task>> GetLeveragedToke var parameters = new ParameterCollection { { "symbol", symbol }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); diff --git a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiTrading.cs b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiTrading.cs index 0e1c13e0d..d5ad09cef 100644 --- a/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiTrading.cs +++ b/Binance.Net/Clients/SpotApi/BinanceRestClientSpotApiTrading.cs @@ -70,17 +70,17 @@ public async Task> PlaceTestOrderAsync var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(type, new SpotOrderTypeConverter(false)) } }; + parameters.AddEnum("side", side); + parameters.AddEnum("type", type); parameters.AddOptionalParameter("quantity", quantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("quoteOrderQty", quoteQuantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("newClientOrderId", newClientOrderId); parameters.AddOptionalParameter("price", price?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("timeInForce", timeInForce == null ? null : JsonConvert.SerializeObject(timeInForce, new TimeInForceConverter(false))); + parameters.AddOptionalEnum("timeInForce", timeInForce); parameters.AddOptionalParameter("stopPrice", stopPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("icebergQty", icebergQty?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("newOrderRespType", orderResponseType == null ? null : JsonConvert.SerializeObject(orderResponseType, new OrderResponseTypeConverter(false))); + parameters.AddOptionalEnum("newOrderRespType", orderResponseType); parameters.AddOptionalParameter("trailingDelta", trailingDelta); parameters.AddOptionalParameter("strategyId", strategyId); parameters.AddOptionalParameter("strategyType", strategyType); @@ -240,10 +240,10 @@ public async Task> ReplaceOrderAsync(st var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(type, new SpotOrderTypeConverter(false)) }, { "cancelReplaceMode", EnumConverter.GetString(cancelReplaceMode) } }; + parameters.AddEnum("side", side); + parameters.AddEnum("type", type); parameters.AddOptionalParameter("cancelNewClientOrderId", newCancelClientOrderId); parameters.AddOptionalParameter("newClientOrderId", clientOrderId); parameters.AddOptionalParameter("cancelOrderId", cancelOrderId); @@ -253,10 +253,10 @@ public async Task> ReplaceOrderAsync(st parameters.AddOptionalParameter("quantity", quantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("quoteOrderQty", quoteQuantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("price", price?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("timeInForce", timeInForce == null ? null : JsonConvert.SerializeObject(timeInForce, new TimeInForceConverter(false))); + parameters.AddOptionalEnum("timeInForce", timeInForce); parameters.AddOptionalParameter("stopPrice", stopPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("icebergQty", icebergQty?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("newOrderRespType", orderResponseType == null ? null : JsonConvert.SerializeObject(orderResponseType, new OrderResponseTypeConverter(false))); + parameters.AddOptionalEnum("newOrderRespType", orderResponseType); parameters.AddOptionalParameter("trailingDelta", trailingDelta); parameters.AddOptionalParameter("cancelRestrictions", EnumConverter.GetString(cancelRestriction)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); @@ -370,11 +370,11 @@ public async Task> PlaceOcoOrderAsync(string var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "price", price.ToString(CultureInfo.InvariantCulture) }, { "stopPrice", stopPrice.ToString(CultureInfo.InvariantCulture) } }; + parameters.AddEnum("side", side); parameters.AddOptionalParameter("limitStrategyId", limitStrategyId); parameters.AddOptionalParameter("limitStrategyType", limitStrategyType); @@ -388,7 +388,7 @@ public async Task> PlaceOcoOrderAsync(string parameters.AddOptionalParameter("stopClientOrderId", stopClientOrderId); parameters.AddOptionalParameter("limitIcebergQty", limitIcebergQuantity); parameters.AddOptionalParameter("stopIcebergQty", stopIcebergQuantity); - parameters.AddOptionalParameter("stopLimitTimeInForce", stopLimitTimeInForce == null ? null : JsonConvert.SerializeObject(stopLimitTimeInForce, new TimeInForceConverter(false))); + parameters.AddOptionalEnum("stopLimitTimeInForce", stopLimitTimeInForce); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "api/v3/order/oco", BinanceExchange.RateLimiter.SpotRestUid, 2, true); @@ -435,11 +435,11 @@ public async Task> PlaceOcoOrderListAsync( var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "aboveType", EnumConverter.GetString(aboveOrderType) }, { "belowType", EnumConverter.GetString(belowOrderType) }, }; + parameters.AddEnum("side", side); parameters.AddOptional("aboveClientOrderId", aboveClientOrderId); parameters.AddOptional("aboveIcebergQty", aboveIcebergQuantity); @@ -962,21 +962,21 @@ public async Task> PlaceMarginOCOOrderA var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "price", price.ToString(CultureInfo.InvariantCulture) }, { "stopPrice", stopPrice.ToString(CultureInfo.InvariantCulture) } }; + parameters.AddEnum("side", side); parameters.AddOptionalParameter("stopLimitPrice", stopLimitPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("isIsolated", isIsolated?.ToString()); - parameters.AddOptionalParameter("sideEffectType", sideEffectType == null ? null : JsonConvert.SerializeObject(sideEffectType, new SideEffectTypeConverter(false))); + parameters.AddOptionalEnum("sideEffectType", sideEffectType); parameters.AddOptionalParameter("listClientOrderId", listClientOrderId); parameters.AddOptionalParameter("limitClientOrderId", limitClientOrderId); parameters.AddOptionalParameter("stopClientOrderId", stopClientOrderId); parameters.AddOptionalParameter("limitIcebergQty", limitIcebergQuantity?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("newOrderRespType", orderResponseType == null ? null : JsonConvert.SerializeObject(orderResponseType, new OrderResponseTypeConverter(false))); + parameters.AddOptionalEnum("newOrderRespType", orderResponseType); parameters.AddOptionalParameter("stopIcebergQty", stopIcebergQuantity?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("stopLimitTimeInForce", stopLimitTimeInForce == null ? null : JsonConvert.SerializeObject(stopLimitTimeInForce, new TimeInForceConverter(false))); + parameters.AddOptionalEnum("stopLimitTimeInForce", stopLimitTimeInForce); parameters.AddOptionalParameter("autoRepayAtCancel", autoRepayAtCancel); parameters.AddOptionalParameter("selfTradePreventionMode", EnumConverter.GetString(selfTradePreventionMode)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); @@ -1161,7 +1161,7 @@ public async Task>> GetLeverage public async Task>> GetC2CTradeHistoryAsync(OrderSide side, DateTime? startTime = null, DateTime? endTime = null, int? page = null, int? pageSize = null, long? receiveWindow = null, CancellationToken ct = default) { var parameters = new ParameterCollection(); - parameters.AddOptionalParameter("tradeType", JsonConvert.SerializeObject(side, new OrderSideConverter(false))); + parameters.AddOptionalEnum("tradeType", side); parameters.AddOptionalParameter("startTimestamp", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTimestamp", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("page", page); @@ -1220,7 +1220,7 @@ public async Task> ConvertQuoteRequestAsync(s parameters.AddParameter("toAsset", baseAsset); parameters.AddOptionalParameter("fromAmount", quoteQuantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("toAmount", baseQuantity?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("walletType", walletType != null ? JsonConvert.SerializeObject(walletType, new WalletTypeConverter(false)) : null); + parameters.AddOptionalEnum("walletType", walletType); parameters.AddOptionalParameter("validTime", EnumConverter.GetString(validTime)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); @@ -1322,10 +1322,10 @@ public async Task> PlaceTimeWeightedAverag var parameters = new ParameterCollection() { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "duration", duration }, }; + parameters.AddEnum("side", side); parameters.AddOptionalParameter("clientAlgoId", clientOrderId); parameters.AddOptionalParameter("limitPrice", limitPrice); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); @@ -1368,7 +1368,7 @@ public async Task> GetClosedAlgoOrdersAsync(str { var parameters = new ParameterCollection(); parameters.AddOptionalParameter("symbol", symbol); - parameters.AddOptionalParameter("side", side == null ? null : JsonConvert.SerializeObject(side, new OrderSideConverter(false))); + parameters.AddOptionalEnum("side", side); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("page", page); diff --git a/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApi.cs b/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApi.cs index 67c07b61c..59bb33d1e 100644 --- a/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApi.cs +++ b/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApi.cs @@ -66,12 +66,16 @@ internal BinanceSocketClientSpotApi(ILogger logger, BinanceSocketOptions options protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials) => new BinanceAuthenticationProvider(credentials); + protected override IMessageSerializer CreateSerializer() => new SystemTextJsonMessageSerializer(); + + protected override IByteMessageAccessor CreateAccessor() => new SystemTextJsonByteMessageAccessor(); + /// public override string? GetListenerIdentifier(IMessageAccessor message) { - var id = message.GetValue(_idPath); + var id = message.GetValue(_idPath); if (id != null) - return id; + return id.ToString(); return message.GetValue(_streamPath); } diff --git a/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiExchangeData.cs b/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiExchangeData.cs index 421a413cb..c432c9d7d 100644 --- a/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiExchangeData.cs +++ b/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiExchangeData.cs @@ -289,7 +289,7 @@ public async Task> SubscribeToKlineUpdatesAsync(I symbols = symbols.SelectMany(a => intervals.Select(i => a.ToLower(CultureInfo.InvariantCulture) + "@kline" + "_" + - JsonConvert.SerializeObject(i, new KlineIntervalConverter(false)))).ToArray(); + EnumConverter.GetString(i))).ToArray(); return await _client.SubscribeAsync(_client.BaseAddress, symbols, handler, ct).ConfigureAwait(false); } @@ -486,7 +486,7 @@ public async Task> SubscribeToBlvtKlineUpdatesAsy { var address = _client.ClientOptions.Environment.BlvtSocketAddress ?? throw new Exception("No url found for Blvt stream, check the `BlvtSocketAddress` in the client environment"); - tokens = tokens.Select(a => a.ToUpper(CultureInfo.InvariantCulture) + "@nav_kline" + "_" + JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false))).ToArray(); + tokens = tokens.Select(a => a.ToUpper(CultureInfo.InvariantCulture) + "@nav_kline" + "_" + EnumConverter.GetString(interval)).ToArray(); var handler = new Action>>(data => onMessage(data.As(data.Data.Data).WithStreamId(data.Data.Stream).WithSymbol(data.Data.Data.Symbol))); return await _client.SubscribeAsync(address.AppendPath("lvt-p"), tokens, handler, ct).ConfigureAwait(false); } diff --git a/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiTrading.cs b/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiTrading.cs index 2d66d1593..20434f7e9 100644 --- a/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiTrading.cs +++ b/Binance.Net/Clients/SpotApi/BinanceSocketClientSpotApiTrading.cs @@ -166,13 +166,13 @@ public async Task>> Replac { string clientOrderId = newClientOrderId ?? ExchangeHelpers.AppendRandomString(_client._brokerId, 32); - var parameters = new Dictionary + var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(type, new SpotOrderTypeConverter(false)) }, { "cancelReplaceMode", EnumConverter.GetString(cancelReplaceMode) } }; + parameters.AddEnum("side", side); + parameters.AddEnum("type", type); parameters.AddOptionalParameter("cancelNewClientOrderId", newCancelClientOrderId); parameters.AddOptionalParameter("newClientOrderId", clientOrderId); parameters.AddOptionalParameter("cancelOrderId", cancelOrderId); @@ -182,10 +182,10 @@ public async Task>> Replac parameters.AddOptionalParameter("quantity", quantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("quoteOrderQty", quoteQuantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("price", price?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("timeInForce", timeInForce == null ? null : JsonConvert.SerializeObject(timeInForce, new TimeInForceConverter(false))); + parameters.AddOptionalEnum("timeInForce", timeInForce); parameters.AddOptionalParameter("stopPrice", stopPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("icebergQty", icebergQty?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("newOrderRespType", orderResponseType == null ? null : JsonConvert.SerializeObject(orderResponseType, new OrderResponseTypeConverter(false))); + parameters.AddOptionalEnum("newOrderRespType", orderResponseType); parameters.AddOptionalParameter("trailingDelta", trailingDelta?.ToString(CultureInfo.InvariantCulture)); return await _client.QueryAsync(_client.ClientOptions.Environment.SpotSocketApiAddress.AppendPath("ws-api/v3"), $"order.cancelReplace", parameters, true, true, ct: ct).ConfigureAwait(false); @@ -245,15 +245,15 @@ public async Task>> PlaceOcoOrde limitClientOrderId ??= ExchangeHelpers.AppendRandomString(_client._brokerId, 32); stopClientOrderId ??= ExchangeHelpers.AppendRandomString(_client._brokerId, 32); - var parameters = new Dictionary + var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "price", price.ToString(CultureInfo.InvariantCulture) }, { "stopPrice", stopPrice.ToString(CultureInfo.InvariantCulture) } }; + parameters.AddEnum("side", side); parameters.AddOptionalParameter("limitStrategyId", limitStrategyId?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("limitStrategyType", limitStrategyType?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("limitIcebergQty", limitIcebergQty?.ToString(CultureInfo.InvariantCulture)); @@ -270,7 +270,7 @@ public async Task>> PlaceOcoOrde parameters.AddOptionalParameter("stopIcebergQty", stopIcebergQty?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("stopIcebergQty", stopIcebergQuantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("stopClientOrderId", stopClientOrderId); - parameters.AddOptionalParameter("stopLimitTimeInForce", stopLimitTimeInForce == null ? null : JsonConvert.SerializeObject(stopLimitTimeInForce, new TimeInForceConverter(false))); + parameters.AddOptionalEnum("stopLimitTimeInForce", stopLimitTimeInForce); return await _client.QueryAsync(_client.ClientOptions.Environment.SpotSocketApiAddress.AppendPath("ws-api/v3"), $"orderList.place", parameters, true, true, ct: ct).ConfigureAwait(false); } @@ -314,11 +314,11 @@ public async Task>> PlaceOcoOrde var parameters = new ParameterCollection { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "aboveType", EnumConverter.GetString(aboveOrderType) }, { "belowType", EnumConverter.GetString(belowOrderType) }, }; + parameters.AddEnum("side", side); parameters.AddOptional("aboveClientOrderId", aboveClientOrderId); parameters.AddOptional("aboveIcebergQty", aboveIcebergQuantity); diff --git a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApi.cs b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApi.cs index fb31ee412..7ffe9acb7 100644 --- a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApi.cs +++ b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApi.cs @@ -95,7 +95,11 @@ event Action IBaseRestClient.OnOrderCa /// protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials) => new BinanceAuthenticationProvider(credentials); - + + protected override IStreamMessageAccessor CreateAccessor() => new SystemTextJsonStreamMessageAccessor(); + + protected override IMessageSerializer CreateSerializer() => new SystemTextJsonMessageSerializer(); + internal Uri GetUrl(string endpoint, string api, string? version = null) { var result = BaseAddress.AppendPath(api); diff --git a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiAccount.cs b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiAccount.cs index e241f6941..fe8e77efa 100644 --- a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiAccount.cs +++ b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiAccount.cs @@ -75,8 +75,8 @@ public async Task> ChangeMar var parameters = new ParameterCollection { { "symbol", symbol }, - { "marginType", JsonConvert.SerializeObject(marginType, new FuturesMarginTypeConverter(false)) } }; + parameters.AddEnum("marginType", marginType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "fapi/v1/marginType", BinanceExchange.RateLimiter.FuturesRest, 1, true); @@ -94,9 +94,9 @@ public async Task> ModifyPosit { { "symbol", symbol }, { "amount", quantity.ToString(CultureInfo.InvariantCulture) }, - { "type", JsonConvert.SerializeObject(type, new FuturesMarginChangeDirectionTypeConverter(false)) } }; - parameters.AddOptionalParameter("positionSide", positionSide == null ? null : JsonConvert.SerializeObject(positionSide, new PositionSideConverter(false))); + parameters.AddEnum("type", type); + parameters.AddOptionalEnum("positionSide", positionSide); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "fapi/v1/positionMargin", BinanceExchange.RateLimiter.FuturesRest, 1, true); @@ -114,7 +114,7 @@ public async Task StopUserStreamAsync(string listenKey, Cancellat #endregion - #region Account Information + #region Get Account Info /// - public async Task> GetAccountInfoAsync(long? receiveWindow = null, CancellationToken ct = default) + public async Task> GetAccountInfoAsync(CancellationToken ct = default) { var parameters = new ParameterCollection(); - parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); - - var request = _definitions.GetOrCreate(HttpMethod.Get, "fapi/v2/account", BinanceExchange.RateLimiter.FuturesRest, 5, true); - return await _baseClient.SendAsync(request, parameters, ct).ConfigureAwait(false); + var request = _definitions.GetOrCreate(HttpMethod.Get, "/fapi/v3/account", BinanceExchange.RateLimiter.FuturesRest, 5, true); + var result = await _baseClient.SendAsync(request, parameters, ct).ConfigureAwait(false); + return result; } #endregion @@ -255,7 +254,7 @@ public async Task>> G var parameters = new ParameterCollection(); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); - var request = _definitions.GetOrCreate(HttpMethod.Get, "fapi/v2/balance", BinanceExchange.RateLimiter.FuturesRest, 5, true); + var request = _definitions.GetOrCreate(HttpMethod.Get, "fapi/v3/balance", BinanceExchange.RateLimiter.FuturesRest, 5, true); return await _baseClient.SendAsync>(request, parameters, ct).ConfigureAwait(false); } @@ -468,5 +467,33 @@ public async Task SetBnbBurnStatusAsync(bool feeBurn, long? recei } #endregion + + #region Get Symbol Configuration + + /// + public async Task>> GetSymbolConfigurationAsync(string? symbol = null, CancellationToken ct = default) + { + var parameters = new ParameterCollection(); + parameters.AddOptional("symbol", symbol); + var request = _definitions.GetOrCreate(HttpMethod.Get, "/fapi/v1/symbolConfig", BinanceExchange.RateLimiter.FuturesRest, 5, true); + var result = await _baseClient.SendAsync>(request, parameters, ct).ConfigureAwait(false); + return result; + } + + #endregion + + #region Get Account Configuration + + /// + public async Task> GetAccountConfigurationAsync(CancellationToken ct = default) + { + var parameters = new ParameterCollection(); + var request = _definitions.GetOrCreate(HttpMethod.Get, "/fapi/v1/accountConfig", BinanceExchange.RateLimiter.FuturesRest, 5, true); + var result = await _baseClient.SendAsync(request, parameters, ct).ConfigureAwait(false); + return result; + } + + #endregion + } } diff --git a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiExchangeData.cs b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiExchangeData.cs index 1eae9b8d2..3d94f9697 100644 --- a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiExchangeData.cs +++ b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiExchangeData.cs @@ -145,9 +145,9 @@ public async Task>> GetT var parameters = new ParameterCollection { { "symbol", symbolPair }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } }; + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -168,9 +168,9 @@ public async Task>> GetT var parameters = new ParameterCollection { { "symbol", symbolPair }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } }; + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -191,9 +191,9 @@ public async Task>> GetG var parameters = new ParameterCollection { { "symbol", symbolPair }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } }; + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -214,9 +214,9 @@ public async Task>> GetMarkPric var parameters = new ParameterCollection { { "symbol", symbol }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -305,8 +305,8 @@ public async Task>> GetKlinesAsync(stri limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { { "symbol", symbol }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -365,9 +365,9 @@ public async Task>> var parameters = new ParameterCollection { { "symbol", symbol }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } }; + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -388,9 +388,9 @@ public async Task>> var parameters = new ParameterCollection { { "symbol", symbol }, - { "period", JsonConvert.SerializeObject(period, new PeriodIntervalConverter(false)) } }; + parameters.AddEnum("period", period); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -447,9 +447,9 @@ public async Task>> GetContinuousContra limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { { "pair", pair }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) }, - { "contractType", JsonConvert.SerializeObject(contractType, new ContractTypeConverter(false)) } }; + parameters.AddEnum("interval", interval); + parameters.AddEnum("contractType", contractType); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); @@ -470,8 +470,8 @@ public async Task>> GetIndexPriceKlines limit?.ValidateIntBetween(nameof(limit), 1, 1500); var parameters = new ParameterCollection { { "pair", pair }, - { "interval", JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false)) } }; + parameters.AddEnum("interval", interval); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("limit", limit?.ToString(CultureInfo.InvariantCulture)); diff --git a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiTrading.cs b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiTrading.cs index 6e0463aa8..0f24d898a 100644 --- a/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiTrading.cs +++ b/Binance.Net/Clients/UsdFuturesApi/BinanceRestClientUsdFuturesApiTrading.cs @@ -4,6 +4,8 @@ using Binance.Net.Objects.Models.Futures; using Binance.Net.Objects.Models.Futures.AlgoOrders; using CryptoExchange.Net.CommonObjects; +using System.Drawing; +using System.Text.Json; namespace Binance.Net.Clients.UsdFuturesApi { @@ -75,22 +77,22 @@ public async Task> PlaceOrderAsync( var parameters = new ParameterCollection() { - { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(type, new FuturesOrderTypeConverter(false)) } + { "symbol", symbol } }; + parameters.AddEnum("side", side); + parameters.AddEnum("type", type); parameters.AddOptionalParameter("quantity", quantity?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("newClientOrderId", clientOrderId); parameters.AddOptionalParameter("price", price?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("timeInForce", timeInForce == null ? null : JsonConvert.SerializeObject(timeInForce, new TimeInForceConverter(false))); - parameters.AddOptionalParameter("positionSide", positionSide == null ? null : JsonConvert.SerializeObject(positionSide, new PositionSideConverter(false))); + parameters.AddOptionalEnum("timeInForce", timeInForce); + parameters.AddOptionalEnum("positionSide", positionSide); parameters.AddOptionalParameter("stopPrice", stopPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("activationPrice", activationPrice?.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("callbackRate", callbackRate?.ToString(CultureInfo.InvariantCulture)); - parameters.AddOptionalParameter("workingType", workingType == null ? null : JsonConvert.SerializeObject(workingType, new WorkingTypeConverter(false))); + parameters.AddOptionalEnum("workingType", workingType); parameters.AddOptionalParameter("reduceOnly", reduceOnly?.ToString().ToLower()); parameters.AddOptionalParameter("closePosition", closePosition?.ToString().ToLower()); - parameters.AddOptionalParameter("newOrderRespType", orderResponseType == null ? null : JsonConvert.SerializeObject(orderResponseType, new OrderResponseTypeConverter(false))); + parameters.AddOptionalEnum("newOrderRespType", orderResponseType); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("priceProtect", priceProtect?.ToString().ToUpper()); parameters.AddOptionalEnum("priceMatch", priceMatch); @@ -145,27 +147,26 @@ public async Task>> var orderParameters = new ParameterCollection() { { "symbol", order.Symbol }, - { "side", JsonConvert.SerializeObject(order.Side, new OrderSideConverter(false)) }, - { "type", JsonConvert.SerializeObject(order.Type, new FuturesOrderTypeConverter(false)) }, { "newOrderRespType", "RESULT" } }; - + orderParameters.AddEnum("side", order.Side); + orderParameters.AddEnum("type", order.Type); orderParameters.AddOptionalParameter("quantity", order.Quantity?.ToString(CultureInfo.InvariantCulture)); orderParameters.AddOptionalParameter("newClientOrderId", clientOrderId); + orderParameters.AddOptionalEnum("timeInForce", order.TimeInForce); + orderParameters.AddOptionalEnum("positionSide", order.PositionSide); orderParameters.AddOptionalParameter("price", order.Price?.ToString(CultureInfo.InvariantCulture)); - orderParameters.AddOptionalParameter("timeInForce", order.TimeInForce == null ? null : JsonConvert.SerializeObject(order.TimeInForce, new TimeInForceConverter(false))); - orderParameters.AddOptionalParameter("positionSide", order.PositionSide == null ? null : JsonConvert.SerializeObject(order.PositionSide, new PositionSideConverter(false))); orderParameters.AddOptionalParameter("stopPrice", order.StopPrice?.ToString(CultureInfo.InvariantCulture)); orderParameters.AddOptionalParameter("activationPrice", order.ActivationPrice?.ToString(CultureInfo.InvariantCulture)); orderParameters.AddOptionalParameter("callbackRate", order.CallbackRate?.ToString(CultureInfo.InvariantCulture)); - orderParameters.AddOptionalParameter("workingType", order.WorkingType == null ? null : JsonConvert.SerializeObject(order.WorkingType, new WorkingTypeConverter(false))); + orderParameters.AddOptionalEnum("workingType", order.WorkingType); orderParameters.AddOptionalParameter("reduceOnly", order.ReduceOnly?.ToString().ToLower()); orderParameters.AddOptionalParameter("priceProtect", order.PriceProtect?.ToString().ToUpper()); parameterOrders.Add(orderParameters); i++; } - parameters.Add("batchOrders", JsonConvert.SerializeObject(parameterOrders)); + parameters.Add("batchOrders", JsonSerializer.Serialize(parameterOrders)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Post, "fapi/v1/batchOrders", BinanceExchange.RateLimiter.FuturesRest, 5, true); @@ -319,18 +320,17 @@ public async Task>> var orderParameters = new ParameterCollection() { { "symbol", order.Symbol }, - { "side", JsonConvert.SerializeObject(order.Side, new OrderSideConverter(false)) }, { "quantity", order.Quantity.ToString(CultureInfo.InvariantCulture) }, { "price", order.Price.ToString(CultureInfo.InvariantCulture) }, }; - + orderParameters.AddEnum("side", order.Side); orderParameters.AddOptionalParameter("orderId", order.OrderId); orderParameters.AddOptionalParameter("origClientOrderId", order.ClientOrderId); parameterOrders.Add(orderParameters); i++; } - parameters.Add("batchOrders", JsonConvert.SerializeObject(parameterOrders)); + parameters.Add("batchOrders", JsonSerializer.Serialize(parameterOrders)); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); var request = _definitions.GetOrCreate(HttpMethod.Put, "fapi/v1/batchOrders", BinanceExchange.RateLimiter.FuturesRest, 5, true); @@ -484,7 +484,7 @@ public async Task>> GetForcedO var parameters = new ParameterCollection(); parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.ClientOptions.ReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture)); parameters.AddOptionalParameter("symbol", symbol); - parameters.AddOptionalParameter("autoCloseType", closeType.HasValue ? JsonConvert.SerializeObject(closeType, new AutoCloseTypeConverter(false)) : null); + parameters.AddOptionalEnum("autoCloseType", closeType); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); @@ -540,11 +540,11 @@ public async Task> PlaceVolumeParticipatio var parameters = new ParameterCollection() { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "urgency", EnumConverter.GetString(urgency) }, }; - parameters.AddOptionalParameter("positionSide", positionSide == null ? null : JsonConvert.SerializeObject(positionSide, new PositionSideConverter(false))); + parameters.AddEnum("side", side); + parameters.AddOptionalEnum("positionSide", positionSide); parameters.AddOptionalParameter("clientAlgoId", clientOrderId); parameters.AddOptionalParameter("reduceOnly", reduceOnly); parameters.AddOptionalParameter("limitPrice", limitPrice); @@ -574,11 +574,11 @@ public async Task> PlaceTimeWeightedAverag var parameters = new ParameterCollection() { { "symbol", symbol }, - { "side", JsonConvert.SerializeObject(side, new OrderSideConverter(false)) }, { "quantity", quantity.ToString(CultureInfo.InvariantCulture) }, { "duration", duration }, }; - parameters.AddOptionalParameter("positionSide", positionSide == null ? null : JsonConvert.SerializeObject(positionSide, new PositionSideConverter(false))); + parameters.AddEnum("side", side); + parameters.AddOptionalEnum("positionSide", positionSide); parameters.AddOptionalParameter("clientAlgoId", clientOrderId); parameters.AddOptionalParameter("reduceOnly", reduceOnly); parameters.AddOptionalParameter("limitPrice", limitPrice); @@ -622,7 +622,7 @@ public async Task> GetClosedAlgoOrdersAsync(str { var parameters = new ParameterCollection(); parameters.AddOptionalParameter("symbol", symbol); - parameters.AddOptionalParameter("side", side == null? null: JsonConvert.SerializeObject(side, new OrderSideConverter(false))); + parameters.AddOptionalEnum("side", side); parameters.AddOptionalParameter("startTime", DateTimeConverter.ConvertToMilliseconds(startTime)); parameters.AddOptionalParameter("endTime", DateTimeConverter.ConvertToMilliseconds(endTime)); parameters.AddOptionalParameter("page", page); @@ -653,5 +653,19 @@ public async Task> GetAlgoSubOrdersAsync( #endregion + #region Get Positions + + /// + public async Task>> GetPositionsAsync(string? symbol = null, CancellationToken ct = default) + { + var parameters = new ParameterCollection(); + parameters.AddOptional("symbol", symbol); + var request = _definitions.GetOrCreate(HttpMethod.Get, "/fapi/v3/positionRisk", BinanceExchange.RateLimiter.FuturesRest, 5, true); + var result = await _baseClient.SendAsync>(request, parameters, ct).ConfigureAwait(false); + return result; + } + + #endregion + } } diff --git a/Binance.Net/Clients/UsdFuturesApi/BinanceSocketClientUsdFuturesApi.cs b/Binance.Net/Clients/UsdFuturesApi/BinanceSocketClientUsdFuturesApi.cs index c66c8d742..1527e013f 100644 --- a/Binance.Net/Clients/UsdFuturesApi/BinanceSocketClientUsdFuturesApi.cs +++ b/Binance.Net/Clients/UsdFuturesApi/BinanceSocketClientUsdFuturesApi.cs @@ -68,6 +68,10 @@ protected override AuthenticationProvider CreateAuthenticationProvider(ApiCreden /// public override string FormatSymbol(string baseAsset, string quoteAsset) => baseAsset.ToUpperInvariant() + quoteAsset.ToUpperInvariant(); + protected override IMessageSerializer CreateSerializer() => new SystemTextJsonMessageSerializer(); + + protected override IByteMessageAccessor CreateAccessor() => new SystemTextJsonByteMessageAccessor(); + #region Mark Price Stream /// @@ -116,7 +120,7 @@ public async Task> SubscribeToKlineUpdatesAsync(I { symbols.ValidateNotNull(nameof(symbols)); var handler = new Action>>(data => onMessage(data.As(data.Data.Data).WithStreamId(data.Data.Stream).WithSymbol(data.Data.Data.Symbol))); - symbols = symbols.SelectMany(a => intervals.Select(i => a.ToLower(CultureInfo.InvariantCulture) + _klineStreamEndpoint + "_" + JsonConvert.SerializeObject(i, new KlineIntervalConverter(false)))).ToArray(); + symbols = symbols.SelectMany(a => intervals.Select(i => a.ToLower(CultureInfo.InvariantCulture) + _klineStreamEndpoint + "_" + EnumConverter.GetString(i))).ToArray(); return await SubscribeAsync(BaseAddress, symbols, handler, ct).ConfigureAwait(false); } @@ -134,10 +138,10 @@ public async Task> SubscribeToContinuousContractK var handler = new Action>>(data => onMessage(data.As(data.Data.Data).WithStreamId(data.Data.Stream).WithSymbol(data.Data.Data.Symbol))); pairs = pairs.Select(a => a.ToLower(CultureInfo.InvariantCulture) + "_" + - JsonConvert.SerializeObject(contractType, new ContractTypeConverter(false)).ToLower() + + EnumConverter.GetString(contractType).ToLower() + _continuousContractKlineStreamEndpoint + "_" + - JsonConvert.SerializeObject(interval, new KlineIntervalConverter(false))).ToArray(); + EnumConverter.GetString(interval)).ToArray(); return await SubscribeAsync(BaseAddress, pairs, handler, ct).ConfigureAwait(false); } @@ -412,9 +416,9 @@ internal Task> SubscribeAsync(string url, IEnu /// public override string? GetListenerIdentifier(IMessageAccessor message) { - var id = message.GetValue(_idPath); + var id = message.GetValue(_idPath); if (id != null) - return id; + return id.ToString(); return message.GetValue(_streamPath); } diff --git a/Binance.Net/Converters/AccountTypeConverter.cs b/Binance.Net/Converters/AccountTypeConverter.cs new file mode 100644 index 000000000..ee3d54597 --- /dev/null +++ b/Binance.Net/Converters/AccountTypeConverter.cs @@ -0,0 +1,152 @@ +using Binance.Net.Enums; +using Newtonsoft.Json.Linq; +using System.Collections.Generic; +using System.Text.Json; + +namespace Binance.Net.Converters +{ + internal class AccountTypeConverter : JsonConverterFactory + { + public override bool CanConvert(Type typeToConvert) + { + return typeToConvert == typeof(AccountType) + || typeToConvert == typeof(IEnumerable) + || typeToConvert == typeof(IEnumerable>); + } + + public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) + { + Type converterType = typeof(AccountTypeConverterImp<>).MakeGenericType(typeToConvert); + return (JsonConverter)Activator.CreateInstance(converterType); + } + + internal class AccountTypeConverterImp : JsonConverter + { + public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (typeToConvert == typeof(AccountType)) + { + return (T)(object)(ParseAccountType(ref reader) ?? AccountType.TradeGroup002); + } + else if(typeToConvert == typeof(IEnumerable)) + { + var result = new List(); + while(reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndArray) + break; + + if (reader.TokenType == JsonTokenType.StartArray) + continue; + + var parseResult = ParseAccountType(ref reader); + if (parseResult != null) + result.Add(parseResult.Value); + } + return (T)(object)result; + } + else if (typeToConvert == typeof(IEnumerable>)) + { + var result = new List>(); + reader.Read(); // Start array + do + { + if (reader.TokenType == JsonTokenType.EndArray) + break; + + var resultInner = new List(); + reader.Read(); // Start array + do + { + if (reader.TokenType == JsonTokenType.EndArray) + break; + + + var parseResult = ParseAccountType(ref reader); + if (parseResult != null) + resultInner.Add(parseResult.Value); + } + while (reader.Read()); + result.Add(resultInner); + } + while (reader.Read()); + return (T)(object)result; + } + + throw new InvalidOperationException("Invalid type"); + } + + public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) + { + if (value is AccountType act) + { + WriteAccountType(writer, act); + } + else if (value is IEnumerable actList) + { + writer.WriteStartArray(); + foreach(var val in actList) + WriteAccountType(writer, val); + writer.WriteEndArray(); + } + else if (value is IEnumerable> actListList) + { + writer.WriteStartArray(); + foreach (var valList in actListList) + { + writer.WriteStartArray(); + foreach (var val in valList) + WriteAccountType(writer, val); + writer.WriteEndArray(); + } + writer.WriteEndArray(); + } + } + + private void WriteAccountType(Utf8JsonWriter writer, AccountType value) + { + if (value == AccountType.Spot) + writer.WriteStringValue("SPOT"); + if (value == AccountType.Margin) + writer.WriteStringValue("MARGIN"); + if (value == AccountType.Leveraged) + writer.WriteStringValue("LEVERAGED"); + if (value == AccountType.Futures) + writer.WriteStringValue("FUTURES"); + + writer.WriteStringValue("TRD_GRP_002"); + } + + private AccountType? ParseAccountType(ref Utf8JsonReader reader) + { + var str = reader.GetString(); + if (str == null) + return AccountType.TradeGroup002; + + if (str.StartsWith("TRD_GRP_")) + { + var number = str.Substring(8); + if (Enum.TryParse("TradeGroup" + number, out var value)) + return value; + + return null; + } + else + { + if (str.Equals("SPOT", StringComparison.Ordinal)) + return AccountType.Spot; + if (str.Equals("MARGIN", StringComparison.Ordinal)) + return AccountType.Margin; + if (str.Equals("LEVERAGED", StringComparison.Ordinal)) + return AccountType.Leveraged; + if (str.Equals("FUTURES", StringComparison.Ordinal)) + return AccountType.Futures; + } + + return null; + } + } + } + + +} diff --git a/Binance.Net/Converters/AccountUpdateReasonConverter.cs b/Binance.Net/Converters/AccountUpdateReasonConverter.cs deleted file mode 100644 index 7fb9e52db..000000000 --- a/Binance.Net/Converters/AccountUpdateReasonConverter.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class AccountUpdateReasonConverter : BaseConverter - { - public AccountUpdateReasonConverter() : this(true) { } - public AccountUpdateReasonConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(AccountUpdateReason.Deposit, "DEPOSIT"), - new KeyValuePair(AccountUpdateReason.Withdraw, "WITHDRAW"), - new KeyValuePair(AccountUpdateReason.Order, "ORDER"), - new KeyValuePair(AccountUpdateReason.FundingFee, "FUNDING_FEE"), - new KeyValuePair(AccountUpdateReason.WithdrawReject, "WITHDRAW_REJECT"), - new KeyValuePair(AccountUpdateReason.Adjustment, "ADJUSTMENT"), - new KeyValuePair(AccountUpdateReason.InsuranceClear, "INSURANCE_CLEAR"), - new KeyValuePair(AccountUpdateReason.AdminDeposit, "ADMIN_DEPOSIT"), - new KeyValuePair(AccountUpdateReason.AdminWithdraw, "ADMIN_WITHDRAW"), - new KeyValuePair(AccountUpdateReason.MarginTransfer, "MARGIN_TRANSFER"), - new KeyValuePair(AccountUpdateReason.MarginTypeChange, "MARGIN_TYPE_CHANGE"), - new KeyValuePair(AccountUpdateReason.AssetTransfer, "ASSET_TRANSFER"), - new KeyValuePair(AccountUpdateReason.OptionsPremiumFee, "OPTIONS_PREMIUM_FEE"), - new KeyValuePair(AccountUpdateReason.OptionsSettleProfit, "OPTIONS_SETTLE_PROFIT"), - new KeyValuePair(AccountUpdateReason.CoinSwapWithdraw, "AUTO_EXCHANGE"), - new KeyValuePair(AccountUpdateReason.CoinSwapWithdraw, "COIN_SWAP_WITHDRAW"), - new KeyValuePair(AccountUpdateReason.CoinSwapDeposit, "COIN_SWAP_DEPOSIT"), - }; - } -} diff --git a/Binance.Net/Converters/AdjustRateDirectionConverter.cs b/Binance.Net/Converters/AdjustRateDirectionConverter.cs deleted file mode 100644 index 03af13606..000000000 --- a/Binance.Net/Converters/AdjustRateDirectionConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class AdjustRateDirectionConverter : BaseConverter - { - public AdjustRateDirectionConverter() : this(true) { } - public AdjustRateDirectionConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(AdjustRateDirection.Reduced, "REDUCED"), - new KeyValuePair(AdjustRateDirection.Additional, "ADDITIONAL") - }; - } -} diff --git a/Binance.Net/Converters/AutoCloseTypeConverter.cs b/Binance.Net/Converters/AutoCloseTypeConverter.cs deleted file mode 100644 index 6bd0bb1ac..000000000 --- a/Binance.Net/Converters/AutoCloseTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class AutoCloseTypeConverter : BaseConverter - { - public AutoCloseTypeConverter() : this(true) { } - public AutoCloseTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(AutoCloseType.ADL, "ADL"), - new KeyValuePair(AutoCloseType.Liquidation, "LIQUIDATION") - }; - } -} diff --git a/Binance.Net/Converters/BinanceEarningTypeConverter.cs b/Binance.Net/Converters/BinanceEarningTypeConverter.cs deleted file mode 100644 index d9f4ca81c..000000000 --- a/Binance.Net/Converters/BinanceEarningTypeConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class BinanceEarningTypeConverter : BaseConverter - { - public BinanceEarningTypeConverter() : this(true) { } - public BinanceEarningTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(BinanceEarningType.MiningWallet, "0"), - new KeyValuePair(BinanceEarningType.MergedMining, "1"), - new KeyValuePair(BinanceEarningType.ActivityBonus, "2"), - new KeyValuePair(BinanceEarningType.Rebate, "3"), - new KeyValuePair(BinanceEarningType.SmartPool, "4"), - new KeyValuePair(BinanceEarningType.MiningAddress, "5"), - new KeyValuePair(BinanceEarningType.IncomeTransfer, "6"), - new KeyValuePair(BinanceEarningType.PoolSavings, "7"), - new KeyValuePair(BinanceEarningType.Transfered, "8"), - new KeyValuePair(BinanceEarningType.IncomeTransfer, "31"), - new KeyValuePair(BinanceEarningType.HashrateResaleMiningWallet, "32"), - new KeyValuePair(BinanceEarningType.HashrateResalePoolSavings, "33") - }; - } -} diff --git a/Binance.Net/Converters/BlvtStatusConverter.cs b/Binance.Net/Converters/BlvtStatusConverter.cs deleted file mode 100644 index 33f66e66c..000000000 --- a/Binance.Net/Converters/BlvtStatusConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class BlvtStatusConverter : BaseConverter - { - public BlvtStatusConverter() : this(true) { } - public BlvtStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(BlvtStatus.Pending, "P"), - new KeyValuePair(BlvtStatus.Success, "S"), - new KeyValuePair(BlvtStatus.Failure, "F") - }; - } -} diff --git a/Binance.Net/Converters/BrokerageAccountTypeConverter.cs b/Binance.Net/Converters/BrokerageAccountTypeConverter.cs deleted file mode 100644 index 0b04f0919..000000000 --- a/Binance.Net/Converters/BrokerageAccountTypeConverter.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class BrokerageAccountTypeConverter : JsonConverter - { - private readonly bool quotes; - - public BrokerageAccountTypeConverter() - { - quotes = true; - } - - public BrokerageAccountTypeConverter(bool useQuotes) - { - quotes = useQuotes; - } - - private readonly Dictionary values = new Dictionary - { - {BrokerageAccountType.Spot, "SPOT"}, - {BrokerageAccountType.FuturesCoin, "COIN_FUTURE"}, - {BrokerageAccountType.FuturesUsdt, "USDT_FUTURE"}, - }; - - public override bool CanConvert(Type objectType) - { - return objectType == typeof(BrokerageAccountType); - } - - public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) - { - return values.Single(v => v.Value == (string?)reader.Value).Key; - } - - public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) - { - if (quotes) - writer.WriteValue(values[(BrokerageAccountType)value!]); - else - writer.WriteRawValue(values[(BrokerageAccountType)value!]); - } - } -} \ No newline at end of file diff --git a/Binance.Net/Converters/BrokerageTransferTransactionStatusConverter.cs b/Binance.Net/Converters/BrokerageTransferTransactionStatusConverter.cs deleted file mode 100644 index 346aef6e8..000000000 --- a/Binance.Net/Converters/BrokerageTransferTransactionStatusConverter.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class BrokerageTransferTransactionStatusConverter : BaseConverter - { - public BrokerageTransferTransactionStatusConverter() : this(true) { } - public BrokerageTransferTransactionStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => - new List> - { - new KeyValuePair(BrokerageTransferTransactionStatus.Init, "INIT"), - new KeyValuePair(BrokerageTransferTransactionStatus.Process, "PROCESS"), - new KeyValuePair(BrokerageTransferTransactionStatus.Success, "SUCCESS"), - new KeyValuePair(BrokerageTransferTransactionStatus.Failure, "FAILURE"), - }; - } -} \ No newline at end of file diff --git a/Binance.Net/Converters/ContractTypeConverter.cs b/Binance.Net/Converters/ContractTypeConverter.cs deleted file mode 100644 index 9d1f1f38d..000000000 --- a/Binance.Net/Converters/ContractTypeConverter.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class ContractTypeConverter : BaseConverter - { - public ContractTypeConverter() : this(true) { } - public ContractTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(ContractType.Perpetual, "PERPETUAL"), - new KeyValuePair(ContractType.PerpetualDelivering, "PERPETUAL DELIVERING"), - new KeyValuePair(ContractType.CurrentMonth, "CURRENT_MONTH"), - new KeyValuePair(ContractType.CurrentQuarter, "CURRENT_QUARTER"), - new KeyValuePair(ContractType.CurrentQuarterDelivering, "CURRENT_QUARTER DELIVERING"), - new KeyValuePair(ContractType.NextQuarter, "NEXT_QUARTER"), - new KeyValuePair(ContractType.NextQuarterDelivering, "NEXT_QUARTER DELIVERING"), - new KeyValuePair(ContractType.NextMonth, "NEXT_MONTH"), - new KeyValuePair(ContractType.Unknown, ""), - }; - } -} diff --git a/Binance.Net/Converters/DepositStatusConverter.cs b/Binance.Net/Converters/DepositStatusConverter.cs deleted file mode 100644 index e18296706..000000000 --- a/Binance.Net/Converters/DepositStatusConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class DepositStatusConverter: BaseConverter - { - public DepositStatusConverter(): this(true) { } - public DepositStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(DepositStatus.Pending, "0"), - new KeyValuePair(DepositStatus.Success, "1"), - new KeyValuePair(DepositStatus.Completed, "6"), - }; - } -} diff --git a/Binance.Net/Converters/ExecutionTypeConverter.cs b/Binance.Net/Converters/ExecutionTypeConverter.cs deleted file mode 100644 index 76d207603..000000000 --- a/Binance.Net/Converters/ExecutionTypeConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class ExecutionTypeConverter: BaseConverter - { - public ExecutionTypeConverter(): this(true) { } - public ExecutionTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(ExecutionType.New, "NEW"), - new KeyValuePair(ExecutionType.Canceled, "CANCELED"), - new KeyValuePair(ExecutionType.Replaced, "REPLACED"), - new KeyValuePair(ExecutionType.Rejected, "REJECTED"), - new KeyValuePair(ExecutionType.Trade, "TRADE"), - new KeyValuePair(ExecutionType.Expired, "EXPIRED"), - new KeyValuePair(ExecutionType.Amendment, "AMENDMENT"), - new KeyValuePair(ExecutionType.Amendment, "TRADE_PREVENTION "), - }; - } -} diff --git a/Binance.Net/Converters/FiatPaymentStatusConverter.cs b/Binance.Net/Converters/FiatPaymentStatusConverter.cs deleted file mode 100644 index 525d9c984..000000000 --- a/Binance.Net/Converters/FiatPaymentStatusConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FiatPaymentStatusConverter : BaseConverter - { - public FiatPaymentStatusConverter() : this(true) { } - public FiatPaymentStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(FiatPaymentStatus.Processing, "Processing"), - new KeyValuePair(FiatPaymentStatus.Completed, "Completed"), - new KeyValuePair(FiatPaymentStatus.Failed, "Failed"), - new KeyValuePair(FiatPaymentStatus.Refunded, "Refunded"), - }; - } -} diff --git a/Binance.Net/Converters/FiatWithdrawDepositStatusConverter.cs b/Binance.Net/Converters/FiatWithdrawDepositStatusConverter.cs deleted file mode 100644 index d16c85988..000000000 --- a/Binance.Net/Converters/FiatWithdrawDepositStatusConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FiatWithdrawDepositStatusConverter : BaseConverter - { - public FiatWithdrawDepositStatusConverter() : this(true) { } - public FiatWithdrawDepositStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(FiatWithdrawDepositStatus.Processing, "Processing"), - new KeyValuePair(FiatWithdrawDepositStatus.Finished, "Finished"), - new KeyValuePair(FiatWithdrawDepositStatus.Failed, "Failed"), - new KeyValuePair(FiatWithdrawDepositStatus.Refunded, "Refunded"), - new KeyValuePair(FiatWithdrawDepositStatus.Refunding, "Refunding"), - new KeyValuePair(FiatWithdrawDepositStatus.Successful, "Successful"), - new KeyValuePair(FiatWithdrawDepositStatus.RefundFailed, "Refund Failed"), - new KeyValuePair(FiatWithdrawDepositStatus.Expired, "Expired"), - }; - } -} diff --git a/Binance.Net/Converters/FuturesAccountTypeConverter.cs b/Binance.Net/Converters/FuturesAccountTypeConverter.cs deleted file mode 100644 index b804e15ed..000000000 --- a/Binance.Net/Converters/FuturesAccountTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FuturesAccountTypeConverter : BaseConverter - { - public FuturesAccountTypeConverter() : this(false) { } - public FuturesAccountTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(FuturesAccountType.UsdtMarginedFutures, "1"), - new KeyValuePair(FuturesAccountType.CoinMarginedFutures, "2"), - }; - } -} diff --git a/Binance.Net/Converters/FuturesMarginChangeDirectionTypeConverter.cs b/Binance.Net/Converters/FuturesMarginChangeDirectionTypeConverter.cs deleted file mode 100644 index 9ad3d307a..000000000 --- a/Binance.Net/Converters/FuturesMarginChangeDirectionTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FuturesMarginChangeDirectionTypeConverter : BaseConverter - { - public FuturesMarginChangeDirectionTypeConverter(): this(false) { } - public FuturesMarginChangeDirectionTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(FuturesMarginChangeDirectionType.Add, "1"), - new KeyValuePair(FuturesMarginChangeDirectionType.Reduce, "2") - }; - } -} diff --git a/Binance.Net/Converters/FuturesMarginTypeConverter.cs b/Binance.Net/Converters/FuturesMarginTypeConverter.cs deleted file mode 100644 index f4726f4f6..000000000 --- a/Binance.Net/Converters/FuturesMarginTypeConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FuturesMarginTypeConverter : BaseConverter - { - public FuturesMarginTypeConverter(): this(false) { } - public FuturesMarginTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(FuturesMarginType.Isolated, "ISOLATED"), - new KeyValuePair(FuturesMarginType.Cross, "CROSSED"), - new KeyValuePair(FuturesMarginType.Cross, "cross") //return on BinanceFuturesStreamPosition - }; - } -} diff --git a/Binance.Net/Converters/FuturesOrderTypeConverter.cs b/Binance.Net/Converters/FuturesOrderTypeConverter.cs deleted file mode 100644 index c71692d4d..000000000 --- a/Binance.Net/Converters/FuturesOrderTypeConverter.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FuturesOrderTypeConverter : JsonConverter - { - private readonly bool quotes; - - public FuturesOrderTypeConverter() - { - quotes = true; - } - - public FuturesOrderTypeConverter(bool useQuotes) - { - quotes = useQuotes; - } - - private readonly Dictionary values = new Dictionary - { - { FuturesOrderType.Limit, "LIMIT" }, - { FuturesOrderType.Market, "MARKET" }, - { FuturesOrderType.TakeProfit, "TAKE_PROFIT" }, - { FuturesOrderType.TakeProfitMarket, "TAKE_PROFIT_MARKET" }, - { FuturesOrderType.Stop, "STOP" }, - { FuturesOrderType.StopMarket, "STOP_MARKET" }, - { FuturesOrderType.TrailingStopMarket, "TRAILING_STOP_MARKET" }, - { FuturesOrderType.Liquidation, "LIQUIDATION" } - }; - - public override bool CanConvert(Type objectType) - { - return objectType == typeof(FuturesOrderType); - } - - public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) - { - return values.Single(v => v.Value == (string?)reader.Value).Key; - } - - public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) - { - if (quotes) - writer.WriteValue(values[(FuturesOrderType)value!]); - else - writer.WriteRawValue(values[(FuturesOrderType)value!]); - } - } -} diff --git a/Binance.Net/Converters/FuturesTransferStatusConverter.cs b/Binance.Net/Converters/FuturesTransferStatusConverter.cs deleted file mode 100644 index c993689bf..000000000 --- a/Binance.Net/Converters/FuturesTransferStatusConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FuturesTransferStatusConverter : BaseConverter - { - public FuturesTransferStatusConverter() : this(true) { } - public FuturesTransferStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(FuturesTransferStatus.Pending, "PENDING"), - new KeyValuePair(FuturesTransferStatus.Confirmed, "CONFIRMED"), - new KeyValuePair(FuturesTransferStatus.Failed, "FAILED"), - }; - } -} diff --git a/Binance.Net/Converters/FuturesTransferTypeConverter.cs b/Binance.Net/Converters/FuturesTransferTypeConverter.cs deleted file mode 100644 index 0d6e3dc46..000000000 --- a/Binance.Net/Converters/FuturesTransferTypeConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class FuturesTransferTypeConverter: BaseConverter - { - public FuturesTransferTypeConverter() : this(true) { } - public FuturesTransferTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(FuturesTransferType.FromCoinFuturesToSpot, "4"), - new KeyValuePair(FuturesTransferType.FromUsdtFuturesToSpot, "2"), - new KeyValuePair(FuturesTransferType.FromSpotToCoinFutures, "3"), - new KeyValuePair(FuturesTransferType.FromSpotToUsdtFutures, "1"), - }; - } -} diff --git a/Binance.Net/Converters/HashrateResaleStatusConverter.cs b/Binance.Net/Converters/HashrateResaleStatusConverter.cs deleted file mode 100644 index 647dae6e7..000000000 --- a/Binance.Net/Converters/HashrateResaleStatusConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class HashrateResaleStatusConverter : BaseConverter - { - public HashrateResaleStatusConverter() : this(true) { } - public HashrateResaleStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(HashrateResaleStatus.Processing, "0"), - new KeyValuePair(HashrateResaleStatus.Canceled, "1"), - new KeyValuePair(HashrateResaleStatus.Terminated, "2"), - }; - } -} diff --git a/Binance.Net/Converters/IncomeTypeConverter.cs b/Binance.Net/Converters/IncomeTypeConverter.cs deleted file mode 100644 index 152f058a6..000000000 --- a/Binance.Net/Converters/IncomeTypeConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class IncomeTypeConverter: BaseConverter - { - public IncomeTypeConverter(): this(true) { } - public IncomeTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(IncomeType.Transfer, "TRANSFER"), - new KeyValuePair(IncomeType.WelcomeBonus, "WELCOME_BONUS"), - new KeyValuePair(IncomeType.RealizedPnl, "REALIZED_PNL"), - new KeyValuePair(IncomeType.FundingFee, "FUNDING_FEE"), - new KeyValuePair(IncomeType.Commission, "COMMISSION"), - new KeyValuePair(IncomeType.InsuranceClear, "INSURANCE_CLEAR"), - new KeyValuePair(IncomeType.ReferralKickback, "REFERRAL_KICKBACK"), - new KeyValuePair(IncomeType.CommissionRebate, "COMMISSION_REBATE"), - new KeyValuePair(IncomeType.ApiRebate, "API_REBATE"), - new KeyValuePair(IncomeType.ContestReward, "CONTEST_REWARD"), - new KeyValuePair(IncomeType.CrossCollateralTransfer, "CROSS_COLLATERAL_TRANSFER"), - new KeyValuePair(IncomeType.OptionsPremiumFee, "OPTIONS_PREMIUM_FEE"), - new KeyValuePair(IncomeType.OptionsSettleProfit, "OPTIONS_SETTLE_PROFIT"), - new KeyValuePair(IncomeType.InternalTransfer, "INTERNAL_TRANSFER"), - new KeyValuePair(IncomeType.AutoExchange, "AUTO_EXCHANGE"), - new KeyValuePair(IncomeType.DeliveredSettlement, "DELIVERED_SETTELMENT"), - new KeyValuePair(IncomeType.CoinSwapDeposit, "COIN_SWAP_DEPOSIT"), - new KeyValuePair(IncomeType.CoinSwapWithdraw, "COIN_SWAP_WITHDRAW"), - new KeyValuePair(IncomeType.PositionLimitIncreaseFee, "POSITION_LIMIT_INCREASE_FEE"), - }; - } -} diff --git a/Binance.Net/Converters/IndicatorTypeConverter.cs b/Binance.Net/Converters/IndicatorTypeConverter.cs deleted file mode 100644 index e577be231..000000000 --- a/Binance.Net/Converters/IndicatorTypeConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class IndicatorTypeConverter : BaseConverter - { - public IndicatorTypeConverter() : this(true) { } - public IndicatorTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(IndicatorType.CancelationRatio, "GCR"), - new KeyValuePair(IndicatorType.UnfilledRatio, "UFR"), - new KeyValuePair(IndicatorType.ExpirationRatio, "IFER") - }; - } -} diff --git a/Binance.Net/Converters/InterfaceConverter.cs b/Binance.Net/Converters/InterfaceConverter.cs index 870892037..b1f362e49 100644 --- a/Binance.Net/Converters/InterfaceConverter.cs +++ b/Binance.Net/Converters/InterfaceConverter.cs @@ -1,20 +1,19 @@ -namespace Binance.Net.Converters +using System.Text.Json; + +namespace Binance.Net.Converters { - internal class InterfaceConverter: JsonConverter + internal class InterfaceConverter : JsonConverter where TImp: TInterface { - public override bool CanConvert(Type objectType) - { - return true; - } + public override bool CanConvert(Type objectType) => objectType == typeof(TInterface); - public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + public override TInterface? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - return serializer.Deserialize(reader); + return (TImp)JsonSerializer.Deserialize(ref reader, typeof(TImp), options)!; } - public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + public override void Write(Utf8JsonWriter writer, TInterface value, JsonSerializerOptions options) { - serializer.Serialize(writer, value); + JsonSerializer.Serialize(writer, value, typeof(TImp), options); } } } diff --git a/Binance.Net/Converters/IsolatedMarginTransferDirectionConverter.cs b/Binance.Net/Converters/IsolatedMarginTransferDirectionConverter.cs deleted file mode 100644 index 09ec61137..000000000 --- a/Binance.Net/Converters/IsolatedMarginTransferDirectionConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class IsolatedMarginTransferDirectionConverter : BaseConverter - { - public IsolatedMarginTransferDirectionConverter() : this(true) { } - public IsolatedMarginTransferDirectionConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(IsolatedMarginTransferDirection.Spot, "SPOT"), - new KeyValuePair(IsolatedMarginTransferDirection.IsolatedMargin, "ISOLATED_MARGIN"), - }; - } -} diff --git a/Binance.Net/Converters/KlineIntervalConverter.cs b/Binance.Net/Converters/KlineIntervalConverter.cs deleted file mode 100644 index d14764a64..000000000 --- a/Binance.Net/Converters/KlineIntervalConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class KlineIntervalConverter: BaseConverter - { - public KlineIntervalConverter(): this(true) { } - public KlineIntervalConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(KlineInterval.OneSecond, "1s"), - new KeyValuePair(KlineInterval.OneMinute, "1m"), - new KeyValuePair(KlineInterval.ThreeMinutes, "3m"), - new KeyValuePair(KlineInterval.FiveMinutes, "5m"), - new KeyValuePair(KlineInterval.FifteenMinutes, "15m"), - new KeyValuePair(KlineInterval.ThirtyMinutes, "30m"), - new KeyValuePair(KlineInterval.OneHour, "1h"), - new KeyValuePair(KlineInterval.TwoHour, "2h"), - new KeyValuePair(KlineInterval.FourHour, "4h"), - new KeyValuePair(KlineInterval.SixHour, "6h"), - new KeyValuePair(KlineInterval.EightHour, "8h"), - new KeyValuePair(KlineInterval.TwelveHour, "12h"), - new KeyValuePair(KlineInterval.OneDay, "1d"), - new KeyValuePair(KlineInterval.ThreeDay, "3d"), - new KeyValuePair(KlineInterval.OneWeek, "1w"), - new KeyValuePair(KlineInterval.OneMonth, "1M") - }; - } -} diff --git a/Binance.Net/Converters/LendingTypeConverter.cs b/Binance.Net/Converters/LendingTypeConverter.cs deleted file mode 100644 index 1c69b7d78..000000000 --- a/Binance.Net/Converters/LendingTypeConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class LendingTypeConverter : BaseConverter - { - public LendingTypeConverter() : this(true) { } - public LendingTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(LendingType.Activity, "ACTIVITY"), - new KeyValuePair(LendingType.CustomizedFixed, "CUSTOMIZED_FIXED"), - new KeyValuePair(LendingType.Daily, "DAILY") - }; - } -} diff --git a/Binance.Net/Converters/LiquidityTypeConverter.cs b/Binance.Net/Converters/LiquidityTypeConverter.cs deleted file mode 100644 index 5895d8ec6..000000000 --- a/Binance.Net/Converters/LiquidityTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class LiquidityTypeConverter : BaseConverter - { - public LiquidityTypeConverter() : this(true) { } - public LiquidityTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(LiquidityType.Single, "SINGLE"), - new KeyValuePair(LiquidityType.Combined, "COMBINATION") - }; - } -} diff --git a/Binance.Net/Converters/ListOrderStatusConverter.cs b/Binance.Net/Converters/ListOrderStatusConverter.cs deleted file mode 100644 index f9b8f43ad..000000000 --- a/Binance.Net/Converters/ListOrderStatusConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class ListOrderStatusConverter : BaseConverter - { - public ListOrderStatusConverter(): this(true) { } - public ListOrderStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(ListOrderStatus.Executing, "EXECUTING"), - new KeyValuePair(ListOrderStatus.Rejected, "REJECT"), - new KeyValuePair(ListOrderStatus.Done, "ALL_DONE"), - }; - } -} diff --git a/Binance.Net/Converters/ListStatusTypeConverter.cs b/Binance.Net/Converters/ListStatusTypeConverter.cs deleted file mode 100644 index 3beb69d3c..000000000 --- a/Binance.Net/Converters/ListStatusTypeConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class ListStatusTypeConverter : BaseConverter - { - public ListStatusTypeConverter(): this(true) { } - public ListStatusTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(ListStatusType.Response, "RESPONSE"), - new KeyValuePair(ListStatusType.ExecutionStarted, "EXEC_STARTED"), - new KeyValuePair(ListStatusType.Done, "ALL_DONE"), - }; - } -} diff --git a/Binance.Net/Converters/LoanIncomeTypeConverter.cs b/Binance.Net/Converters/LoanIncomeTypeConverter.cs deleted file mode 100644 index dbe7dbc05..000000000 --- a/Binance.Net/Converters/LoanIncomeTypeConverter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class LoanIncomeTypeConverter : BaseConverter - { - public LoanIncomeTypeConverter(): this(true) { } - public LoanIncomeTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(LoanIncomeType.AddCollateral, "addCollateral"), - new KeyValuePair(LoanIncomeType.BorrowIn, "borrowIn"), - new KeyValuePair(LoanIncomeType.CollateralReturn, "collateralReturn"), - new KeyValuePair(LoanIncomeType.CollateralReturnAfterLiquidation, "collateralReturnAfterLiquidation"), - new KeyValuePair(LoanIncomeType.CollateralSpent, "collateralSpent"), - new KeyValuePair(LoanIncomeType.RemoveCollateral, "removeCollateral"), - new KeyValuePair(LoanIncomeType.RepayAmount, "repayAmount"), - }; - } -} diff --git a/Binance.Net/Converters/MarginLevelStatusConverter.cs b/Binance.Net/Converters/MarginLevelStatusConverter.cs deleted file mode 100644 index d1a49107f..000000000 --- a/Binance.Net/Converters/MarginLevelStatusConverter.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class MarginLevelStatusConverter : BaseConverter - { - public MarginLevelStatusConverter() : this(true) { } - public MarginLevelStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(MarginLevelStatus.Excessive, "EXCESSIVE"), - new KeyValuePair(MarginLevelStatus.Normal, "NORMAL"), - new KeyValuePair(MarginLevelStatus.MarginCall, "MARGIN_CALL"), - new KeyValuePair(MarginLevelStatus.PreLiquidation, "PRE_LIQUIDATION"), - new KeyValuePair(MarginLevelStatus.ForceLiquidation, "FORCE_LIQUIDATION") - }; - } -} diff --git a/Binance.Net/Converters/MarginStatusConverter.cs b/Binance.Net/Converters/MarginStatusConverter.cs deleted file mode 100644 index 63e947461..000000000 --- a/Binance.Net/Converters/MarginStatusConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class MarginStatusConverter : BaseConverter - { - public MarginStatusConverter(): this(false) { } - public MarginStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(MarginStatus.Pending, "PENDING"), - new KeyValuePair(MarginStatus.Completed, "COMPLETED"), - new KeyValuePair(MarginStatus.Confirmed , "CONFIRMED"), - new KeyValuePair(MarginStatus.Failed, "FAILED"), - }; - } -} diff --git a/Binance.Net/Converters/MinerStatusConverter.cs b/Binance.Net/Converters/MinerStatusConverter.cs deleted file mode 100644 index 5a313c6a7..000000000 --- a/Binance.Net/Converters/MinerStatusConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class MinerStatusConverter : BaseConverter - { - public MinerStatusConverter(): this(true) { } - public MinerStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(MinerStatus.All, "0"), - new KeyValuePair(MinerStatus.Valid, "1"), - new KeyValuePair(MinerStatus.Invalid, "2"), - new KeyValuePair(MinerStatus.Failure, "3"), - }; - } -} diff --git a/Binance.Net/Converters/OrderRejectReasonConverter.cs b/Binance.Net/Converters/OrderRejectReasonConverter.cs deleted file mode 100644 index e2c34de91..000000000 --- a/Binance.Net/Converters/OrderRejectReasonConverter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class OrderRejectReasonConverter: BaseConverter - { - public OrderRejectReasonConverter(): this(true) { } - public OrderRejectReasonConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(OrderRejectReason.None, "NONE"), - new KeyValuePair(OrderRejectReason.UnknownInstrument, "UNKNOWN_INSTRUMENT"), - new KeyValuePair(OrderRejectReason.MarketClosed, "MARKET_CLOSED"), - new KeyValuePair(OrderRejectReason.PriceQuantityExceedsHardLimits, "PRICE_QTY_EXCEED_HARD_LIMITS"), - new KeyValuePair(OrderRejectReason.UnknownOrder, "UNKNOWN_ORDER"), - new KeyValuePair(OrderRejectReason.DuplicateOrder, "DUPLICATE_ORDER"), - new KeyValuePair(OrderRejectReason.UnknownAccount, "UNKNOWN_ACCOUNT" ), - new KeyValuePair(OrderRejectReason.InsufficientBalance, "INSUFFICIENT_BALANCE" ), - new KeyValuePair(OrderRejectReason.AccountInactive, "ACCOUNT_INACTIVE" ), - new KeyValuePair(OrderRejectReason.AccountCannotSettle, "ACCOUNT_CANNOT_SETTLE"), - new KeyValuePair(OrderRejectReason.StopPriceWouldTrigger, "STOP_PRICE_WOULD_TRIGGER_IMMEDIATELY") - }; - } -} diff --git a/Binance.Net/Converters/OrderResponseTypeConverter.cs b/Binance.Net/Converters/OrderResponseTypeConverter.cs deleted file mode 100644 index 94120faaa..000000000 --- a/Binance.Net/Converters/OrderResponseTypeConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class OrderResponseTypeConverter: BaseConverter - { - public OrderResponseTypeConverter(): this(true) { } - public OrderResponseTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(OrderResponseType.Acknowledge, "ACK"), - new KeyValuePair(OrderResponseType.Result, "RESULT"), - new KeyValuePair( OrderResponseType.Full, "FULL") - }; - } -} diff --git a/Binance.Net/Converters/OrderSideConverter.cs b/Binance.Net/Converters/OrderSideConverter.cs deleted file mode 100644 index 82f9869ae..000000000 --- a/Binance.Net/Converters/OrderSideConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class OrderSideConverter : BaseConverter - { - public OrderSideConverter(): this(true) { } - public OrderSideConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(OrderSide.Buy, "BUY"), - new KeyValuePair(OrderSide.Sell, "SELL") - }; - } -} diff --git a/Binance.Net/Converters/OrderStatusConverter.cs b/Binance.Net/Converters/OrderStatusConverter.cs deleted file mode 100644 index aad087ff9..000000000 --- a/Binance.Net/Converters/OrderStatusConverter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class OrderStatusConverter : BaseConverter - { - public OrderStatusConverter(): this(true) { } - public OrderStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(OrderStatus.PendingNew, "PENDING_NEW"), - new KeyValuePair(OrderStatus.New, "NEW"), - new KeyValuePair(OrderStatus.PartiallyFilled, "PARTIALLY_FILLED"), - new KeyValuePair(OrderStatus.Filled, "FILLED" ), - new KeyValuePair(OrderStatus.Canceled, "CANCELED"), - new KeyValuePair(OrderStatus.PendingCancel, "PENDING_CANCEL"), - new KeyValuePair(OrderStatus.Rejected, "REJECTED"), - new KeyValuePair(OrderStatus.Insurance, "NEW_INSURANCE" ), - new KeyValuePair(OrderStatus.Adl, "NEW_ADL" ), - new KeyValuePair(OrderStatus.Expired, "EXPIRED" ), - new KeyValuePair(OrderStatus.ExpiredInMatch, "EXPIRED_IN_MATCH" ), - }; - } -} diff --git a/Binance.Net/Converters/PeriodIntervalConverter.cs b/Binance.Net/Converters/PeriodIntervalConverter.cs deleted file mode 100644 index c90e464d9..000000000 --- a/Binance.Net/Converters/PeriodIntervalConverter.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class PeriodIntervalConverter : BaseConverter - { - public PeriodIntervalConverter() : this(true) { } - public PeriodIntervalConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(PeriodInterval.FiveMinutes, "5m"), - new KeyValuePair(PeriodInterval.FifteenMinutes, "15m"), - new KeyValuePair(PeriodInterval.ThirtyMinutes, "30m"), - new KeyValuePair(PeriodInterval.OneHour, "1h"), - new KeyValuePair(PeriodInterval.TwoHour, "2h"), - new KeyValuePair(PeriodInterval.FourHour, "4h"), - new KeyValuePair(PeriodInterval.SixHour, "6h"), - new KeyValuePair(PeriodInterval.TwelveHour, "12h"), - new KeyValuePair(PeriodInterval.OneDay, "1d") - }; - } -} diff --git a/Binance.Net/Converters/PositionModeConverter.cs b/Binance.Net/Converters/PositionModeConverter.cs deleted file mode 100644 index 54aee3e07..000000000 --- a/Binance.Net/Converters/PositionModeConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class PositionModeConverter : JsonConverter - { - public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) - { - writer.WriteValue(value?.ToString() == PositionMode.Hedge.ToString()); - } - - public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) - { - return ((bool)reader.Value!) ? PositionMode.Hedge : PositionMode.OneWay; - } - - public override bool CanConvert(Type objectType) - { - return objectType == typeof(bool); - } - } -} diff --git a/Binance.Net/Converters/PositionSideConverter.cs b/Binance.Net/Converters/PositionSideConverter.cs deleted file mode 100644 index 094108cdc..000000000 --- a/Binance.Net/Converters/PositionSideConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class PositionSideConverter : BaseConverter - { - public PositionSideConverter() : this(true) { } - public PositionSideConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(PositionSide.Short, "SHORT"), - new KeyValuePair(PositionSide.Long, "LONG"), - new KeyValuePair(PositionSide.Both, "BOTH"), - }; - } -} diff --git a/Binance.Net/Converters/ProductStatusConverter.cs b/Binance.Net/Converters/ProductStatusConverter.cs deleted file mode 100644 index 3e8191aec..000000000 --- a/Binance.Net/Converters/ProductStatusConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class ProductStatusConverter : BaseConverter - { - public ProductStatusConverter() : this(true) { } - public ProductStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(ProductStatus.All, "ALL"), - new KeyValuePair(ProductStatus.Subscribable, "SUBSCRIBABLE"), - new KeyValuePair(ProductStatus.Unsubscribable, "UNSUBSCRIBABLE") - }; - } -} diff --git a/Binance.Net/Converters/ProjectStatusConverter.cs b/Binance.Net/Converters/ProjectStatusConverter.cs deleted file mode 100644 index 5781b0c3d..000000000 --- a/Binance.Net/Converters/ProjectStatusConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class ProjectStatusConverter : BaseConverter - { - public ProjectStatusConverter() : this(true) { } - public ProjectStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(ProjectStatus.Holding, "HOLDING"), - new KeyValuePair(ProjectStatus.Redeemed, "REDEEMED") - }; - } -} diff --git a/Binance.Net/Converters/ProjectTypeConverter.cs b/Binance.Net/Converters/ProjectTypeConverter.cs deleted file mode 100644 index 48a6e3677..000000000 --- a/Binance.Net/Converters/ProjectTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class ProjectTypeConverter : BaseConverter - { - public ProjectTypeConverter() : this(true) { } - public ProjectTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(ProjectType.CustomizedFixed, "CUSTOMIZED_FIXED"), - new KeyValuePair(ProjectType.Activity, "ACTIVITY") - }; - } -} diff --git a/Binance.Net/Converters/RateLimitConverter.cs b/Binance.Net/Converters/RateLimitConverter.cs deleted file mode 100644 index 65f74975f..000000000 --- a/Binance.Net/Converters/RateLimitConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class RateLimitConverter: BaseConverter - { - public RateLimitConverter() : this(true) { } - public RateLimitConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(RateLimitType.Orders, "ORDERS"), - new KeyValuePair(RateLimitType.RequestWeight, "REQUEST_WEIGHT"), - new KeyValuePair(RateLimitType.RawRequests, "RAW_REQUESTS"), - new KeyValuePair(RateLimitType.Connections, "CONNECTIONS") - }; - } -} diff --git a/Binance.Net/Converters/RedeemTypeConverter.cs b/Binance.Net/Converters/RedeemTypeConverter.cs deleted file mode 100644 index 6c0cdd818..000000000 --- a/Binance.Net/Converters/RedeemTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class RedeemTypeConverter : BaseConverter - { - public RedeemTypeConverter() : this(true) { } - public RedeemTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(RedeemType.Fast, "FAST"), - new KeyValuePair(RedeemType.Normal, "NORMAL") - }; - } -} diff --git a/Binance.Net/Converters/SideEffectTypeConverter.cs b/Binance.Net/Converters/SideEffectTypeConverter.cs deleted file mode 100644 index 952e73df6..000000000 --- a/Binance.Net/Converters/SideEffectTypeConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SideEffectTypeConverter: BaseConverter - { - public SideEffectTypeConverter(): this(true) { } - public SideEffectTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(SideEffectType.NoSideEffect, "NO_SIDE_EFFECT"), - new KeyValuePair(SideEffectType.MarginBuy, "MARGIN_BUY"), - new KeyValuePair(SideEffectType.AutoRepay, "AUTO_REPAY"), - new KeyValuePair(SideEffectType.AutoBorrowRepay, "AUTO_BORROW_REPAY"), - }; - } -} diff --git a/Binance.Net/Converters/SpotOrderTypeConverter.cs b/Binance.Net/Converters/SpotOrderTypeConverter.cs deleted file mode 100644 index db0fb2dc9..000000000 --- a/Binance.Net/Converters/SpotOrderTypeConverter.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SpotOrderTypeConverter : JsonConverter - { - private readonly bool quotes; - - public SpotOrderTypeConverter() - { - quotes = true; - } - - public SpotOrderTypeConverter(bool useQuotes) - { - quotes = useQuotes; - } - - private readonly Dictionary values = new Dictionary - { - { SpotOrderType.Limit, "LIMIT" }, - { SpotOrderType.Market, "MARKET" }, - { SpotOrderType.LimitMaker, "LIMIT_MAKER" }, - { SpotOrderType.StopLoss, "STOP_LOSS" }, - { SpotOrderType.StopLossLimit, "STOP_LOSS_LIMIT" }, - { SpotOrderType.TakeProfit, "TAKE_PROFIT" }, - { SpotOrderType.TakeProfitLimit, "TAKE_PROFIT_LIMIT" } - }; - - public override bool CanConvert(Type objectType) - { - return objectType == typeof(SpotOrderType); - } - - public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) - { - return values.Single(v => v.Value == (string?)reader.Value).Key; - } - - public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) - { - if (quotes) - writer.WriteValue(values[(SpotOrderType)value!]); - else - writer.WriteRawValue(values[(SpotOrderType)value!]); - } - } -} diff --git a/Binance.Net/Converters/SubAccountFuturesTransferTypeConverter.cs b/Binance.Net/Converters/SubAccountFuturesTransferTypeConverter.cs deleted file mode 100644 index 4cdb17524..000000000 --- a/Binance.Net/Converters/SubAccountFuturesTransferTypeConverter.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SubAccountFuturesTransferTypeConverter : BaseConverter - { - public SubAccountFuturesTransferTypeConverter() : this(true) - { - } - - public SubAccountFuturesTransferTypeConverter(bool quotes) : base(quotes) - { - } - - protected override List> Mapping => - new List> - { - new KeyValuePair( - SubAccountFuturesTransferType.FromSpotToUsdtFutures, "1"), - new KeyValuePair( - SubAccountFuturesTransferType.FromUsdtFuturesToSpot, "2"), - new KeyValuePair( - SubAccountFuturesTransferType.FromSpotToCoinFutures, "3"), - new KeyValuePair( - SubAccountFuturesTransferType.FromCoinFuturesToSpot, "4"), - }; - } -} \ No newline at end of file diff --git a/Binance.Net/Converters/SubAccountMarginTransferTypeConverter.cs b/Binance.Net/Converters/SubAccountMarginTransferTypeConverter.cs deleted file mode 100644 index 03a37c481..000000000 --- a/Binance.Net/Converters/SubAccountMarginTransferTypeConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SubAccountMarginTransferTypeConverter : BaseConverter - { - public SubAccountMarginTransferTypeConverter() : this(true) - { - } - - public SubAccountMarginTransferTypeConverter(bool quotes) : base(quotes) - { - } - - protected override List> Mapping => - new List> - { - new KeyValuePair( - SubAccountMarginTransferType.FromSubAccountSpotToSubAccountMargin, "1"), - new KeyValuePair( - SubAccountMarginTransferType.FromSubAccountMarginToSubAccountSpot, "2"), - }; - } -} \ No newline at end of file diff --git a/Binance.Net/Converters/SubAccountTransferSubAccountTypeConverter.cs b/Binance.Net/Converters/SubAccountTransferSubAccountTypeConverter.cs deleted file mode 100644 index 1bb3e718a..000000000 --- a/Binance.Net/Converters/SubAccountTransferSubAccountTypeConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SubAccountTransferSubAccountTypeConverter : BaseConverter - { - public SubAccountTransferSubAccountTypeConverter() : this(true) - { - } - - public SubAccountTransferSubAccountTypeConverter(bool quotes) : base(quotes) - { - } - - protected override List> Mapping => - new List> - { - new KeyValuePair( - SubAccountTransferSubAccountType.TransferIn, "1"), - new KeyValuePair( - SubAccountTransferSubAccountType.TransferOut, "2"), - }; - } -} \ No newline at end of file diff --git a/Binance.Net/Converters/SymbolFilterConverter.cs b/Binance.Net/Converters/SymbolFilterConverter.cs index 31f68a82f..05cd7c8a2 100644 --- a/Binance.Net/Converters/SymbolFilterConverter.cs +++ b/Binance.Net/Converters/SymbolFilterConverter.cs @@ -1,257 +1,148 @@ using Binance.Net.Enums; using System.Diagnostics; using Binance.Net.Objects.Models.Spot; +using System.Text.Json; namespace Binance.Net.Converters { - internal class SymbolFilterConverter : JsonConverter + internal class SymbolFilterConverter : JsonConverterFactory { public override bool CanConvert(Type objectType) { - return false; + return true; } - public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) + /// + public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) { -#pragma warning disable 8604, 8602 - var obj = JObject.Load(reader); - var type = new SymbolFilterTypeConverter(false).ReadString(obj["filterType"].ToString()); - BinanceSymbolFilter result; - switch (type) - { - case SymbolFilterType.LotSize: - result = new BinanceSymbolLotSizeFilter - { - MaxQuantity = (decimal)obj["maxQty"], - MinQuantity = (decimal)obj["minQty"], - StepSize = (decimal)obj["stepSize"] - }; - break; - case SymbolFilterType.MarketLotSize: - result = new BinanceSymbolMarketLotSizeFilter - { - MaxQuantity = (decimal)obj["maxQty"], - MinQuantity = (decimal)obj["minQty"], - StepSize = (decimal)obj["stepSize"] - }; - break; - case SymbolFilterType.MinNotional: - result = new BinanceSymbolMinNotionalFilter - { - MinNotional = (decimal)obj["minNotional"], - ApplyToMarketOrders = (bool)obj["applyToMarket"], - AveragePriceMinutes = (int)obj["avgPriceMins"] - }; - break; - case SymbolFilterType.Notional: - result = new BinanceSymbolNotionalFilter - { - MinNotional = (decimal)obj["minNotional"], - MaxNotional = (decimal)obj["maxNotional"], - ApplyMinToMarketOrders = (bool)obj["applyMinToMarket"], - ApplyMaxToMarketOrders = (bool)obj["applyMaxToMarket"], - AveragePriceMinutes = (int)obj["avgPriceMins"] - }; - break; - case SymbolFilterType.Price: - result = new BinanceSymbolPriceFilter - { - MaxPrice = (decimal)obj["maxPrice"], - MinPrice = (decimal)obj["minPrice"], - TickSize = (decimal)obj["tickSize"] - }; - break; - case SymbolFilterType.MaxNumberAlgorithmicOrders: - result = new BinanceSymbolMaxAlgorithmicOrdersFilter - { - MaxNumberAlgorithmicOrders = (int)obj["maxNumAlgoOrders"] - }; - break; - case SymbolFilterType.MaxNumberOrders: - result = new BinanceSymbolMaxOrdersFilter - { - MaxNumberOrders = (int)obj["maxNumOrders"] - }; - break; - - case SymbolFilterType.IcebergParts: - result = new BinanceSymbolIcebergPartsFilter - { - Limit = (int)obj["limit"] - }; - break; - case SymbolFilterType.PricePercent: - result = new BinanceSymbolPercentPriceFilter - { - MultiplierUp = (decimal)obj["multiplierUp"], - MultiplierDown = (decimal)obj["multiplierDown"], - AveragePriceMinutes = (int)obj["avgPriceMins"] - }; - break; - case SymbolFilterType.MaxPosition: - result = new BinanceSymbolMaxPositionFilter - { - MaxPosition = obj.ContainsKey("maxPosition") ? (decimal)obj["maxPosition"] : 0 - }; - break; - case SymbolFilterType.PercentagePriceBySide: - result = new BinanceSymbolPercentPriceBySideFilter - { - AskMultiplierUp = (decimal)obj["askMultiplierUp"], - AskMultiplierDown = (decimal)obj["askMultiplierDown"], - BidMultiplierUp = (decimal)obj["bidMultiplierUp"], - BidMultiplierDown = (decimal)obj["bidMultiplierDown"], - AveragePriceMinutes = (int)obj["avgPriceMins"] - }; - break; - case SymbolFilterType.TrailingDelta: - result = new BinanceSymbolTrailingDeltaFilter - { - MaxTrailingAboveDelta = (int)obj["maxTrailingAboveDelta"], - MaxTrailingBelowDelta = (int)obj["maxTrailingBelowDelta"], - MinTrailingAboveDelta = (int)obj["minTrailingAboveDelta"], - MinTrailingBelowDelta = (int)obj["minTrailingBelowDelta"], - }; - break; - case SymbolFilterType.IcebergOrders: - result = new BinanceMaxNumberOfIcebergOrdersFilter - { - MaxNumIcebergOrders = obj.ContainsKey("maxNumIcebergOrders") ? (int)obj["maxNumIcebergOrders"] : 0 - }; - break; - default: - Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't parse symbol filter of type: " + obj["filterType"]); - result = new BinanceSymbolFilter(); - break; - } -#pragma warning restore 8604 - result.FilterType = type; - return result; + Type converterType = typeof(SymbolFilterConverterImp<>).MakeGenericType(typeToConvert); + return (JsonConverter)Activator.CreateInstance(converterType); } - public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + private class SymbolFilterConverterImp : JsonConverter { - var filter = (BinanceSymbolFilter)value!; - writer.WriteStartObject(); + public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var obj = JsonDocument.ParseValue(ref reader).RootElement; + var type = obj.GetProperty("filterType").Deserialize(SerializerOptions.WithConverters); + BinanceSymbolFilter result; + switch (type) + { + case SymbolFilterType.LotSize: + result = new BinanceSymbolLotSizeFilter + { + MaxQuantity = decimal.Parse(obj.GetProperty("maxQty").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + MinQuantity = decimal.Parse(obj.GetProperty("minQty").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + StepSize = decimal.Parse(obj.GetProperty("stepSize").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture) + }; + break; + case SymbolFilterType.MarketLotSize: + result = new BinanceSymbolMarketLotSizeFilter + { + MaxQuantity = decimal.Parse(obj.GetProperty("maxQty").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + MinQuantity = decimal.Parse(obj.GetProperty("minQty").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + StepSize = decimal.Parse(obj.GetProperty("stepSize").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture) + }; + break; + case SymbolFilterType.MinNotional: + result = new BinanceSymbolMinNotionalFilter + { + MinNotional = decimal.Parse(obj.TryGetProperty("minNotional", out var minNotional) ? minNotional.GetString() : obj.GetProperty("notional").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + ApplyToMarketOrders = obj.TryGetProperty("applyToMarket", out var applyToMarket) ? applyToMarket.GetBoolean() : null, + AveragePriceMinutes = obj.TryGetProperty("avgPriceMins", out var avgPrice) ? avgPrice.GetInt32() : null + }; + break; + case SymbolFilterType.Notional: + result = new BinanceSymbolNotionalFilter + { + MinNotional = decimal.Parse(obj.GetProperty("minNotional").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + MaxNotional = decimal.Parse(obj.GetProperty("maxNotional").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + ApplyMinToMarketOrders = obj.GetProperty("applyMinToMarket").GetBoolean(), + ApplyMaxToMarketOrders = obj.GetProperty("applyMaxToMarket").GetBoolean(), + AveragePriceMinutes = obj.GetProperty("avgPriceMins").GetInt32() + }; + break; + case SymbolFilterType.Price: + result = new BinanceSymbolPriceFilter + { + MaxPrice = decimal.Parse(obj.GetProperty("maxPrice").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + MinPrice = decimal.Parse(obj.GetProperty("minPrice").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + TickSize = decimal.Parse(obj.GetProperty("tickSize").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + }; + break; + case SymbolFilterType.MaxNumberAlgorithmicOrders: + result = new BinanceSymbolMaxAlgorithmicOrdersFilter + { + MaxNumberAlgorithmicOrders = obj.TryGetProperty("maxNumAlgoOrders", out var algoOrderEl) ? algoOrderEl.GetInt32() : obj.GetProperty("limit").GetInt32() + }; + break; + case SymbolFilterType.MaxNumberOrders: + result = new BinanceSymbolMaxOrdersFilter + { + MaxNumberOrders = obj.TryGetProperty("maxNumOrders", out var orderEl) ? orderEl.GetInt32() : obj.GetProperty("limit").GetInt32() + }; + break; - writer.WritePropertyName("filterType"); - writer.WriteValue(JsonConvert.SerializeObject(filter.FilterType, new SymbolFilterTypeConverter(false))); + case SymbolFilterType.IcebergParts: + result = new BinanceSymbolIcebergPartsFilter + { + Limit = obj.GetProperty("limit").GetInt32() + }; + break; + case SymbolFilterType.PricePercent: + result = new BinanceSymbolPercentPriceFilter + { + MultiplierUp = decimal.Parse(obj.GetProperty("multiplierUp").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + MultiplierDown = decimal.Parse(obj.GetProperty("multiplierDown").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + AveragePriceMinutes = obj.TryGetProperty("avgPriceMins", out var avgPriceMins) ? avgPriceMins.GetInt32() : null, + MultiplierDecimal = obj.TryGetProperty("multiplierDecimal", out var mulDec) ? JsonSerializer.Deserialize(mulDec, options) : null + }; + break; + case SymbolFilterType.MaxPosition: + result = new BinanceSymbolMaxPositionFilter + { + MaxPosition = obj.TryGetProperty("maxPosition", out var el) ? decimal.Parse(el.GetString(), NumberStyles.Float, CultureInfo.InvariantCulture) : 0 + }; + break; + case SymbolFilterType.PercentagePriceBySide: + result = new BinanceSymbolPercentPriceBySideFilter + { + AskMultiplierUp = decimal.Parse(obj.GetProperty("askMultiplierUp").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + AskMultiplierDown = decimal.Parse(obj.GetProperty("askMultiplierDown").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + BidMultiplierUp = decimal.Parse(obj.GetProperty("bidMultiplierUp").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + BidMultiplierDown = decimal.Parse(obj.GetProperty("bidMultiplierDown").GetString(), NumberStyles.Float, CultureInfo.InvariantCulture), + AveragePriceMinutes = obj.GetProperty("avgPriceMins").GetInt32() + }; + break; + case SymbolFilterType.TrailingDelta: + result = new BinanceSymbolTrailingDeltaFilter + { + MaxTrailingAboveDelta = obj.GetProperty("maxTrailingAboveDelta").GetInt32(), + MaxTrailingBelowDelta = obj.GetProperty("maxTrailingBelowDelta").GetInt32(), + MinTrailingAboveDelta = obj.GetProperty("minTrailingAboveDelta").GetInt32(), + MinTrailingBelowDelta = obj.GetProperty("minTrailingBelowDelta").GetInt32(), + }; + break; + case SymbolFilterType.IcebergOrders: + result = new BinanceMaxNumberOfIcebergOrdersFilter + { + MaxNumIcebergOrders = obj.TryGetProperty("maxNumIcebergOrders", out var ele) ? ele.GetInt32() : 0 + }; + break; + default: + Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't parse symbol filter of type: " + obj.GetProperty("filterType").GetString()); + result = new BinanceSymbolFilter(); + break; + } +#pragma warning restore 8604 + result.FilterType = type; + return (T)(object)result; + } - switch (filter.FilterType) + public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) { - case SymbolFilterType.LotSize: - var lotSizeFilter = (BinanceSymbolLotSizeFilter)filter; - writer.WritePropertyName("maxQty"); - writer.WriteValue(lotSizeFilter.MaxQuantity); - writer.WritePropertyName("minQty"); - writer.WriteValue(lotSizeFilter.MinQuantity); - writer.WritePropertyName("stepSize"); - writer.WriteValue(lotSizeFilter.StepSize); - break; - case SymbolFilterType.MarketLotSize: - var marketLotSizeFilter = (BinanceSymbolMarketLotSizeFilter)filter; - writer.WritePropertyName("maxQty"); - writer.WriteValue(marketLotSizeFilter.MaxQuantity); - writer.WritePropertyName("minQty"); - writer.WriteValue(marketLotSizeFilter.MinQuantity); - writer.WritePropertyName("stepSize"); - writer.WriteValue(marketLotSizeFilter.StepSize); - break; - case SymbolFilterType.MinNotional: - var minNotionalFilter = (BinanceSymbolMinNotionalFilter)filter; - writer.WritePropertyName("minNotional"); - writer.WriteValue(minNotionalFilter.MinNotional); - writer.WritePropertyName("applyToMarket"); - writer.WriteValue(minNotionalFilter.ApplyToMarketOrders); - writer.WritePropertyName("avgPriceMins"); - writer.WriteValue(minNotionalFilter.AveragePriceMinutes); - break; - case SymbolFilterType.Price: - var priceFilter = (BinanceSymbolPriceFilter)filter; - writer.WritePropertyName("maxPrice"); - writer.WriteValue(priceFilter.MaxPrice); - writer.WritePropertyName("minPrice"); - writer.WriteValue(priceFilter.MinPrice); - writer.WritePropertyName("tickSize"); - writer.WriteValue(priceFilter.TickSize); - break; - case SymbolFilterType.MaxNumberAlgorithmicOrders: - var algoFilter = (BinanceSymbolMaxAlgorithmicOrdersFilter)filter; - writer.WritePropertyName("maxNumAlgoOrders"); - writer.WriteValue(algoFilter.MaxNumberAlgorithmicOrders); - break; - case SymbolFilterType.MaxPosition: - var maxPositionFilter = (BinanceSymbolMaxPositionFilter)filter; - writer.WritePropertyName("maxPosition"); - writer.WriteValue(maxPositionFilter.MaxPosition); - break; - case SymbolFilterType.MaxNumberOrders: - var orderFilter = (BinanceSymbolMaxOrdersFilter)filter; - writer.WritePropertyName("maxNumOrders"); - writer.WriteValue(orderFilter.MaxNumberOrders); - break; - case SymbolFilterType.IcebergParts: - var icebergPartsFilter = (BinanceSymbolIcebergPartsFilter)filter; - writer.WritePropertyName("limit"); - writer.WriteValue(icebergPartsFilter.Limit); - break; - case SymbolFilterType.PricePercent: - var pricePercentFilter = (BinanceSymbolPercentPriceFilter)filter; - writer.WritePropertyName("multiplierUp"); - writer.WriteValue(pricePercentFilter.MultiplierUp); - writer.WritePropertyName("multiplierDown"); - writer.WriteValue(pricePercentFilter.MultiplierDown); - writer.WritePropertyName("avgPriceMins"); - writer.WriteValue(pricePercentFilter.AveragePriceMinutes); - break; - case SymbolFilterType.TrailingDelta: - var TrailingDelta = (BinanceSymbolTrailingDeltaFilter)filter; - writer.WritePropertyName("maxTrailingAboveDelta"); - writer.WriteValue(TrailingDelta.MaxTrailingAboveDelta); - writer.WritePropertyName("maxTrailingBelowDelta"); - writer.WriteValue(TrailingDelta.MaxTrailingBelowDelta); - writer.WritePropertyName("minTrailingAboveDelta"); - writer.WriteValue(TrailingDelta.MinTrailingAboveDelta); - writer.WritePropertyName("minTrailingBelowDelta"); - writer.WriteValue(TrailingDelta.MinTrailingBelowDelta); - break; - case SymbolFilterType.IcebergOrders: - var MaxNumIcebergOrders = (BinanceMaxNumberOfIcebergOrdersFilter)filter; - writer.WritePropertyName("maxNumIcebergOrders"); - writer.WriteValue(MaxNumIcebergOrders.MaxNumIcebergOrders); - break; - case SymbolFilterType.PercentagePriceBySide: - var pricePercentSideBySideFilter = (BinanceSymbolPercentPriceBySideFilter)filter; - writer.WritePropertyName("askMultiplierUp"); - writer.WriteValue(pricePercentSideBySideFilter.AskMultiplierUp); - writer.WritePropertyName("askMultiplierDown"); - writer.WriteValue(pricePercentSideBySideFilter.AskMultiplierDown); - writer.WritePropertyName("bidMultiplierUp"); - writer.WriteValue(pricePercentSideBySideFilter.BidMultiplierUp); - writer.WritePropertyName("bidMultiplierDown"); - writer.WriteValue(pricePercentSideBySideFilter.BidMultiplierDown); - writer.WritePropertyName("avgPriceMins"); - writer.WriteValue(pricePercentSideBySideFilter.AveragePriceMinutes); - break; - case SymbolFilterType.Notional: - var notionalFilter = (BinanceSymbolNotionalFilter)filter; - writer.WritePropertyName("minNotional"); - writer.WriteValue(notionalFilter.MinNotional); - writer.WritePropertyName("maxNotional"); - writer.WriteValue(notionalFilter.MaxNotional); - writer.WritePropertyName("applyMinToMarketOrders"); - writer.WriteValue(notionalFilter.ApplyMinToMarketOrders); - writer.WritePropertyName("applyMaxToMarketOrders"); - writer.WriteValue(notionalFilter.ApplyMaxToMarketOrders); - writer.WritePropertyName("avgPriceMins"); - writer.WriteValue(notionalFilter.AveragePriceMinutes); - break; - default: - Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't write symbol filter of type: " + filter.FilterType); - break; + JsonSerializer.Serialize(writer, value, value!.GetType()); } - - writer.WriteEndObject(); } } } diff --git a/Binance.Net/Converters/SymbolFilterTypeConverter.cs b/Binance.Net/Converters/SymbolFilterTypeConverter.cs deleted file mode 100644 index 1ac57d46c..000000000 --- a/Binance.Net/Converters/SymbolFilterTypeConverter.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SymbolFilterTypeConverter : BaseConverter - { - public SymbolFilterTypeConverter(): this(true) { } - public SymbolFilterTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(SymbolFilterType.LotSize, "LOT_SIZE"), - new KeyValuePair(SymbolFilterType.MarketLotSize, "MARKET_LOT_SIZE"), - new KeyValuePair(SymbolFilterType.MinNotional, "MIN_NOTIONAL"), - new KeyValuePair(SymbolFilterType.Price, "PRICE_FILTER"), - new KeyValuePair(SymbolFilterType.PricePercent, "PERCENT_PRICE"), - new KeyValuePair(SymbolFilterType.IcebergParts, "ICEBERG_PARTS"), - new KeyValuePair(SymbolFilterType.MaxNumberOrders, "MAX_NUM_ORDERS"), - new KeyValuePair(SymbolFilterType.MaxNumberAlgorithmicOrders, "MAX_NUM_ALGO_ORDERS"), - new KeyValuePair(SymbolFilterType.MaxPosition, "MAX_POSITION"), - new KeyValuePair(SymbolFilterType.PercentagePriceBySide, "PERCENT_PRICE_BY_SIDE"), - new KeyValuePair(SymbolFilterType.TrailingDelta, "TRAILING_DELTA"), - new KeyValuePair(SymbolFilterType.Notional, "NOTIONAL"), - new KeyValuePair(SymbolFilterType.IcebergOrders, "EXCHANGE_MAX_NUM_ICEBERG_ORDERS"), - }; - } -} diff --git a/Binance.Net/Converters/SymbolFuturesFilterConverter.cs b/Binance.Net/Converters/SymbolFuturesFilterConverter.cs index 7c4381200..933eba53e 100644 --- a/Binance.Net/Converters/SymbolFuturesFilterConverter.cs +++ b/Binance.Net/Converters/SymbolFuturesFilterConverter.cs @@ -1,151 +1,292 @@ -using Binance.Net.Enums; -using System.Diagnostics; -using Binance.Net.Objects.Models.Futures; +//using Binance.Net.Enums; +//using System.Diagnostics; +//using Binance.Net.Objects.Models.Futures; +//using System.Text.Json; -namespace Binance.Net.Converters -{ - internal class SymbolFuturesFilterConverter : JsonConverter - { - public override bool CanConvert(Type objectType) - { - return false; - } +//namespace Binance.Net.Converters +//{ - public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) - { - var obj = JObject.Load(reader); -#pragma warning disable 8604, 8602 - var type = new SymbolFilterTypeConverter(false).ReadString(obj["filterType"].ToString()); - BinanceFuturesSymbolFilter result; - switch (type) - { - case SymbolFilterType.LotSize: - result = new BinanceSymbolLotSizeFilter - { - MaxQuantity = (decimal)obj["maxQty"], - MinQuantity = (decimal)obj["minQty"], - StepSize = (decimal)obj["stepSize"] - }; - break; - case SymbolFilterType.MarketLotSize: - result = new BinanceSymbolMarketLotSizeFilter - { - MaxQuantity = (decimal)obj["maxQty"], - MinQuantity = (decimal)obj["minQty"], - StepSize = (decimal)obj["stepSize"] - }; - break; - case SymbolFilterType.Price: - result = new BinanceSymbolPriceFilter - { - MaxPrice = (decimal)obj["maxPrice"], - MinPrice = (decimal)obj["minPrice"], - TickSize = (decimal)obj["tickSize"] - }; - break; - case SymbolFilterType.MaxNumberOrders: - result = new BinanceSymbolMaxOrdersFilter - { - MaxNumberOrders = (int)obj["limit"] - }; - break; - case SymbolFilterType.PricePercent: - result = new BinanceSymbolPercentPriceFilter - { - MultiplierUp = (decimal)obj["multiplierUp"], - MultiplierDown = (decimal)obj["multiplierDown"], - MultiplierDecimal = (int)obj["multiplierDecimal"] - }; - break; - case SymbolFilterType.MaxNumberAlgorithmicOrders: - result = new BinanceSymbolMaxAlgorithmicOrdersFilter - { - MaxNumberAlgorithmicOrders = (int)obj["limit"] - }; - break; - case SymbolFilterType.MinNotional: - result = new BinanceSymbolMinNotionalFilter - { - MinNotional = obj.ContainsKey("notional") ? (decimal)obj["notional"] : 0 - }; - break; - default: - Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't parse symbol filter of type: " + obj["filterType"]); - result = new BinanceFuturesSymbolFilter(); - break; - } -#pragma warning restore 8604 - result.FilterType = type; - return result; - } +// internal class SymbolFilterConverter : JsonConverterFactory +// { +// public override bool CanConvert(Type objectType) +// { +// return false; +// } - public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) - { - var filter = (BinanceFuturesSymbolFilter?)value; - writer.WriteStartObject(); +// /// +// public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) +// { +// Type converterType = typeof(SymbolFilterConverterImp<>).MakeGenericType(typeToConvert); +// return (JsonConverter)Activator.CreateInstance(converterType); +// } - writer.WritePropertyName("filterType"); - writer.WriteValue(JsonConvert.SerializeObject(filter.FilterType, new SymbolFilterTypeConverter(false))); +// private class SymbolFilterConverterImp : JsonConverter where T : BinanceFuturesSymbolFilter +// { +// public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) +// { +// var obj = JsonDocument.ParseValue(ref reader).RootElement; +// var type = obj.GetProperty("filterType").Deserialize(); +// BinanceFuturesSymbolFilter result; +// switch (type) +// { +// case SymbolFilterType.LotSize: +// result = new BinanceSymbolLotSizeFilter +// { +// MaxQuantity = obj.GetProperty("maxQty").GetDecimal(), +// MinQuantity = obj.GetProperty("minQty").GetDecimal(), +// StepSize = obj.GetProperty("stepSize").GetDecimal() +// }; +// break; +// case SymbolFilterType.MarketLotSize: +// result = new BinanceSymbolMarketLotSizeFilter +// { +// MaxQuantity = obj.GetProperty("maxQty").GetDecimal(), +// MinQuantity = obj.GetProperty("minQty").GetDecimal(), +// StepSize = obj.GetProperty("stepSize").GetDecimal() +// }; +// break; +// case SymbolFilterType.MinNotional: +// result = new BinanceSymbolMinNotionalFilter +// { +// MinNotional = obj.GetProperty("minNotional").GetDecimal(), +// ApplyToMarketOrders = obj.GetProperty("applyToMarket").GetBoolean(), +// AveragePriceMinutes = obj.GetProperty("avgPriceMins").GetInt32() +// }; +// break; +// case SymbolFilterType.Notional: +// result = new BinanceSymbolNotionalFilter +// { +// MinNotional = obj.GetProperty("minNotional").GetDecimal(), +// MaxNotional = obj.GetProperty("maxNotional").GetDecimal(), +// ApplyMinToMarketOrders = obj.GetProperty("applyMinToMarket").GetBoolean(), +// ApplyMaxToMarketOrders = obj.GetProperty("applyMaxToMarket").GetBoolean(), +// AveragePriceMinutes = obj.GetProperty("avgPriceMins").GetInt32() +// }; +// break; +// case SymbolFilterType.Price: +// result = new BinanceSymbolPriceFilter +// { +// MaxPrice = obj.GetProperty("maxPrice").GetDecimal(), +// MinPrice = obj.GetProperty("minPrice").GetDecimal(), +// TickSize = obj.GetProperty("tickSize").GetDecimal(), +// }; +// break; +// case SymbolFilterType.MaxNumberAlgorithmicOrders: +// result = new BinanceSymbolMaxAlgorithmicOrdersFilter +// { +// MaxNumberAlgorithmicOrders = obj.GetProperty("maxNumAlgoOrders").GetInt32() +// }; +// break; +// case SymbolFilterType.MaxNumberOrders: +// result = new BinanceSymbolMaxOrdersFilter +// { +// MaxNumberOrders = obj.GetProperty("maxNumOrders").GetInt32() +// }; +// break; - switch (filter.FilterType) - { - case SymbolFilterType.LotSize: - var lotSizeFilter = (BinanceSymbolLotSizeFilter)filter; - writer.WritePropertyName("maxQty"); - writer.WriteValue(lotSizeFilter.MaxQuantity); - writer.WritePropertyName("minQty"); - writer.WriteValue(lotSizeFilter.MinQuantity); - writer.WritePropertyName("stepSize"); - writer.WriteValue(lotSizeFilter.StepSize); - break; - case SymbolFilterType.MarketLotSize: - var marketLotSizeFilter = (BinanceSymbolMarketLotSizeFilter)filter; - writer.WritePropertyName("maxQty"); - writer.WriteValue(marketLotSizeFilter.MaxQuantity); - writer.WritePropertyName("minQty"); - writer.WriteValue(marketLotSizeFilter.MinQuantity); - writer.WritePropertyName("stepSize"); - writer.WriteValue(marketLotSizeFilter.StepSize); - break; - case SymbolFilterType.Price: - var priceFilter = (BinanceSymbolPriceFilter)filter; - writer.WritePropertyName("maxPrice"); - writer.WriteValue(priceFilter.MaxPrice); - writer.WritePropertyName("minPrice"); - writer.WriteValue(priceFilter.MinPrice); - writer.WritePropertyName("tickSize"); - writer.WriteValue(priceFilter.TickSize); - break; - case SymbolFilterType.MaxNumberAlgorithmicOrders: - var algoFilter = (BinanceSymbolMaxAlgorithmicOrdersFilter)filter; - writer.WritePropertyName("limit"); - writer.WriteValue(algoFilter.MaxNumberAlgorithmicOrders); - break; - case SymbolFilterType.MaxNumberOrders: - var orderFilter = (BinanceSymbolMaxOrdersFilter)filter; - writer.WritePropertyName("limit"); - writer.WriteValue(orderFilter.MaxNumberOrders); - break; - case SymbolFilterType.PricePercent: - var pricePercentFilter = (BinanceSymbolPercentPriceFilter)filter; - writer.WritePropertyName("multiplierUp"); - writer.WriteValue(pricePercentFilter.MultiplierUp); - writer.WritePropertyName("multiplierDown"); - writer.WriteValue(pricePercentFilter.MultiplierDown); - writer.WritePropertyName("multiplierDecimal"); - writer.WriteValue(pricePercentFilter.MultiplierDecimal); - break; - case SymbolFilterType.MinNotional: - var minNotional = (BinanceSymbolMinNotionalFilter)filter; - writer.WritePropertyName("notional"); - writer.WriteValue(minNotional.MinNotional); - break; - default: - Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't write symbol filter of type: " + filter.FilterType); - break; - } +// case SymbolFilterType.IcebergParts: +// result = new BinanceSymbolIcebergPartsFilter +// { +// Limit = obj.GetProperty("limit").GetInt32() +// }; +// break; +// case SymbolFilterType.PricePercent: +// result = new BinanceSymbolPercentPriceFilter +// { +// MultiplierUp = obj.GetProperty("multiplierUp").GetInt32(), +// MultiplierDown = obj.GetProperty("multiplierDown").GetInt32(), +// AveragePriceMinutes = obj.GetProperty("avgPriceMins").GetInt32() +// }; +// break; +// case SymbolFilterType.MaxPosition: +// result = new BinanceSymbolMaxPositionFilter +// { +// MaxPosition = obj.TryGetProperty("maxPosition", out var el) ? el.GetDecimal() : 0 +// }; +// break; +// case SymbolFilterType.PercentagePriceBySide: +// result = new BinanceSymbolPercentPriceBySideFilter +// { +// AskMultiplierUp = obj.GetProperty("askMultiplierUp").GetDecimal(), +// AskMultiplierDown = obj.GetProperty("askMultiplierDown").GetDecimal(), +// BidMultiplierUp = obj.GetProperty("bidMultiplierUp").GetDecimal(), +// BidMultiplierDown = obj.GetProperty("bidMultiplierDown").GetDecimal(), +// AveragePriceMinutes = obj.GetProperty("avgPriceMins").GetInt32() +// }; +// break; +// case SymbolFilterType.TrailingDelta: +// result = new BinanceSymbolTrailingDeltaFilter +// { +// MaxTrailingAboveDelta = obj.GetProperty("maxTrailingAboveDelta").GetInt32(), +// MaxTrailingBelowDelta = obj.GetProperty("maxTrailingBelowDelta").GetInt32(), +// MinTrailingAboveDelta = obj.GetProperty("minTrailingAboveDelta").GetInt32(), +// MinTrailingBelowDelta = obj.GetProperty("minTrailingBelowDelta").GetInt32(), +// }; +// break; +// case SymbolFilterType.IcebergOrders: +// result = new BinanceMaxNumberOfIcebergOrdersFilter +// { +// MaxNumIcebergOrders = obj.TryGetProperty("maxNumIcebergOrders", out var ele) ? ele.GetInt32() : 0 +// }; +// break; +// default: +// Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't parse symbol filter of type: " + obj.GetProperty("filterType").GetString()); +// result = new BinanceSymbolFilter(); +// break; +// } +//#pragma warning restore 8604 +// result.FilterType = type; +// return (T)result; +// } - writer.WriteEndObject(); - } - } -} +// public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) +// { +// JsonSerializer.Serialize(writer, value, value.GetType()); +// } +// } + +// internal class SymbolFuturesFilterConverter : JsonConverter +// { +// public override bool CanConvert(Type objectType) +// { +// return false; +// } + +// public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) +// { +// var obj = JObject.Load(reader); +//#pragma warning disable 8604, 8602 +// var type = new SymbolFilterTypeConverter(false).ReadString(obj["filterType"].ToString()); +// BinanceFuturesSymbolFilter result; +// switch (type) +// { +// case SymbolFilterType.LotSize: +// result = new BinanceSymbolLotSizeFilter +// { +// MaxQuantity = (decimal)obj["maxQty"], +// MinQuantity = (decimal)obj["minQty"], +// StepSize = (decimal)obj["stepSize"] +// }; +// break; +// case SymbolFilterType.MarketLotSize: +// result = new BinanceSymbolMarketLotSizeFilter +// { +// MaxQuantity = (decimal)obj["maxQty"], +// MinQuantity = (decimal)obj["minQty"], +// StepSize = (decimal)obj["stepSize"] +// }; +// break; +// case SymbolFilterType.Price: +// result = new BinanceSymbolPriceFilter +// { +// MaxPrice = (decimal)obj["maxPrice"], +// MinPrice = (decimal)obj["minPrice"], +// TickSize = (decimal)obj["tickSize"] +// }; +// break; +// case SymbolFilterType.MaxNumberOrders: +// result = new BinanceSymbolMaxOrdersFilter +// { +// MaxNumberOrders = (int)obj["limit"] +// }; +// break; +// case SymbolFilterType.PricePercent: +// result = new BinanceSymbolPercentPriceFilter +// { +// MultiplierUp = (decimal)obj["multiplierUp"], +// MultiplierDown = (decimal)obj["multiplierDown"], +// MultiplierDecimal = (int)obj["multiplierDecimal"] +// }; +// break; +// case SymbolFilterType.MaxNumberAlgorithmicOrders: +// result = new BinanceSymbolMaxAlgorithmicOrdersFilter +// { +// MaxNumberAlgorithmicOrders = (int)obj["limit"] +// }; +// break; +// case SymbolFilterType.MinNotional: +// result = new BinanceSymbolMinNotionalFilter +// { +// MinNotional = obj.ContainsKey("notional") ? (decimal)obj["notional"] : 0 +// }; +// break; +// default: +// Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't parse symbol filter of type: " + obj["filterType"]); +// result = new BinanceFuturesSymbolFilter(); +// break; +// } +//#pragma warning restore 8604 +// result.FilterType = type; +// return result; +// } + +// public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) +// { +// var filter = (BinanceFuturesSymbolFilter?)value; +// writer.WriteStartObject(); + +// writer.WritePropertyName("filterType"); +// writer.WriteValue(JsonConvert.SerializeObject(filter.FilterType, new SymbolFilterTypeConverter(false))); + +// switch (filter.FilterType) +// { +// case SymbolFilterType.LotSize: +// var lotSizeFilter = (BinanceSymbolLotSizeFilter)filter; +// writer.WritePropertyName("maxQty"); +// writer.WriteValue(lotSizeFilter.MaxQuantity); +// writer.WritePropertyName("minQty"); +// writer.WriteValue(lotSizeFilter.MinQuantity); +// writer.WritePropertyName("stepSize"); +// writer.WriteValue(lotSizeFilter.StepSize); +// break; +// case SymbolFilterType.MarketLotSize: +// var marketLotSizeFilter = (BinanceSymbolMarketLotSizeFilter)filter; +// writer.WritePropertyName("maxQty"); +// writer.WriteValue(marketLotSizeFilter.MaxQuantity); +// writer.WritePropertyName("minQty"); +// writer.WriteValue(marketLotSizeFilter.MinQuantity); +// writer.WritePropertyName("stepSize"); +// writer.WriteValue(marketLotSizeFilter.StepSize); +// break; +// case SymbolFilterType.Price: +// var priceFilter = (BinanceSymbolPriceFilter)filter; +// writer.WritePropertyName("maxPrice"); +// writer.WriteValue(priceFilter.MaxPrice); +// writer.WritePropertyName("minPrice"); +// writer.WriteValue(priceFilter.MinPrice); +// writer.WritePropertyName("tickSize"); +// writer.WriteValue(priceFilter.TickSize); +// break; +// case SymbolFilterType.MaxNumberAlgorithmicOrders: +// var algoFilter = (BinanceSymbolMaxAlgorithmicOrdersFilter)filter; +// writer.WritePropertyName("limit"); +// writer.WriteValue(algoFilter.MaxNumberAlgorithmicOrders); +// break; +// case SymbolFilterType.MaxNumberOrders: +// var orderFilter = (BinanceSymbolMaxOrdersFilter)filter; +// writer.WritePropertyName("limit"); +// writer.WriteValue(orderFilter.MaxNumberOrders); +// break; +// case SymbolFilterType.PricePercent: +// var pricePercentFilter = (BinanceSymbolPercentPriceFilter)filter; +// writer.WritePropertyName("multiplierUp"); +// writer.WriteValue(pricePercentFilter.MultiplierUp); +// writer.WritePropertyName("multiplierDown"); +// writer.WriteValue(pricePercentFilter.MultiplierDown); +// writer.WritePropertyName("multiplierDecimal"); +// writer.WriteValue(pricePercentFilter.MultiplierDecimal); +// break; +// case SymbolFilterType.MinNotional: +// var minNotional = (BinanceSymbolMinNotionalFilter)filter; +// writer.WritePropertyName("notional"); +// writer.WriteValue(minNotional.MinNotional); +// break; +// default: +// Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Can't write symbol filter of type: " + filter.FilterType); +// break; +// } + +// writer.WriteEndObject(); +// } +// } +//} diff --git a/Binance.Net/Converters/SymbolStatusConverter.cs b/Binance.Net/Converters/SymbolStatusConverter.cs deleted file mode 100644 index 97b495ac3..000000000 --- a/Binance.Net/Converters/SymbolStatusConverter.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SymbolStatusConverter : BaseConverter - { - public SymbolStatusConverter(): this(true) { } - public SymbolStatusConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(SymbolStatus.AuctionMatch, "AUCTION_MATCH"), - new KeyValuePair(SymbolStatus.Break, "BREAK"), - new KeyValuePair(SymbolStatus.EndOfDay, "END_OF_DAY"), - new KeyValuePair(SymbolStatus.Halt, "HALT"), - new KeyValuePair(SymbolStatus.PostTrading, "POST_TRADING"), - new KeyValuePair(SymbolStatus.PreTrading, "PRE_TRADING"), - new KeyValuePair(SymbolStatus.PendingTrading, "PENDING_TRADING"), - new KeyValuePair(SymbolStatus.Trading, "TRADING"), - new KeyValuePair(SymbolStatus.Close, "CLOSE"), - new KeyValuePair(SymbolStatus.PreDelivering, "PRE_DELIVERING"), - new KeyValuePair(SymbolStatus.Delivering, "DELIVERING"), - new KeyValuePair(SymbolStatus.PreSettle, "PRE_SETTLE"), - new KeyValuePair(SymbolStatus.Settling, "SETTLING"), - }; - } -} diff --git a/Binance.Net/Converters/SystemStatusConverter.cs b/Binance.Net/Converters/SystemStatusConverter.cs deleted file mode 100644 index 92cbb1c0d..000000000 --- a/Binance.Net/Converters/SystemStatusConverter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class SystemStatusConverter : BaseConverter - { - public SystemStatusConverter() : this(true) - { - } - - public SystemStatusConverter(bool quotes) : base(quotes) - { - } - - protected override List> Mapping => new List> - { - new KeyValuePair(SystemStatus.Normal, "0"), - new KeyValuePair(SystemStatus.Maintenance, "1") - }; - } -} diff --git a/Binance.Net/Converters/TimeInForceConverter.cs b/Binance.Net/Converters/TimeInForceConverter.cs deleted file mode 100644 index e306badf4..000000000 --- a/Binance.Net/Converters/TimeInForceConverter.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class TimeInForceConverter : BaseConverter - { - public TimeInForceConverter(): this(true) { } - public TimeInForceConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(TimeInForce.GoodTillCanceled, "GTC"), - new KeyValuePair(TimeInForce.GoodTillDate, "GTD"), - new KeyValuePair(TimeInForce.ImmediateOrCancel, "IOC"), - new KeyValuePair(TimeInForce.FillOrKill, "FOK"), - new KeyValuePair(TimeInForce.GoodTillCrossing, "GTX"), - new KeyValuePair(TimeInForce.GoodTillExpiredOrCanceled, "GTE_GTC") - }; - } -} diff --git a/Binance.Net/Converters/TransferAccountTypeConverter.cs b/Binance.Net/Converters/TransferAccountTypeConverter.cs deleted file mode 100644 index 29a5bec04..000000000 --- a/Binance.Net/Converters/TransferAccountTypeConverter.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class TransferAccountTypeConverter : BaseConverter - { - public TransferAccountTypeConverter() : this(true) { } - public TransferAccountTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(TransferAccountType.Spot, "SPOT"), - new KeyValuePair(TransferAccountType.UsdtFuture, "USDT_FUTURE"), - new KeyValuePair(TransferAccountType.CoinFuture, "COIN_FUTURE"), - new KeyValuePair(TransferAccountType.Margin, "MARGIN"), - new KeyValuePair(TransferAccountType.IsolatedMargin, "ISOLATED_MARGIN"), - }; - } -} diff --git a/Binance.Net/Converters/TransferDirectionConverter.cs b/Binance.Net/Converters/TransferDirectionConverter.cs deleted file mode 100644 index 3cb0b3bf6..000000000 --- a/Binance.Net/Converters/TransferDirectionConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class TransferDirectionConverter: BaseConverter - { - public TransferDirectionConverter(): this(true) { } - public TransferDirectionConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(TransferDirection.RollIn, "ROLL_IN"), - new KeyValuePair(TransferDirection.RollOut, "ROLL_OUT"), - }; - } -} diff --git a/Binance.Net/Converters/TransferDirectionTypeConverter.cs b/Binance.Net/Converters/TransferDirectionTypeConverter.cs deleted file mode 100644 index 6ffb6a08b..000000000 --- a/Binance.Net/Converters/TransferDirectionTypeConverter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class TransferDirectionTypeConverter : BaseConverter - { - public TransferDirectionTypeConverter() : this(true) - { - } - - public TransferDirectionTypeConverter(bool quotes) : base(quotes) - { - } - - protected override List> Mapping => new List> - { - new KeyValuePair( TransferDirectionType.MainToMargin, "1"), - new KeyValuePair( TransferDirectionType.MarginToMain, "2") - }; - } -} diff --git a/Binance.Net/Converters/UnderlyingTypeConverter.cs b/Binance.Net/Converters/UnderlyingTypeConverter.cs deleted file mode 100644 index 430636ef7..000000000 --- a/Binance.Net/Converters/UnderlyingTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class UnderlyingTypeConverter : BaseConverter - { - public UnderlyingTypeConverter() : this(true) { } - public UnderlyingTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(UnderlyingType.Coin, "COIN"), - new KeyValuePair(UnderlyingType.Index, "INDEX") - }; - } -} diff --git a/Binance.Net/Converters/UniversalTransferTypeConverter.cs b/Binance.Net/Converters/UniversalTransferTypeConverter.cs deleted file mode 100644 index 0ec8dc28d..000000000 --- a/Binance.Net/Converters/UniversalTransferTypeConverter.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class UniversalTransferTypeConverter : BaseConverter - { - public UniversalTransferTypeConverter() : this(true) { } - public UniversalTransferTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(UniversalTransferType.MainToFunding, "MAIN_FUNDING"), - new KeyValuePair(UniversalTransferType.MainToUsdFutures, "MAIN_UMFUTURE"), - new KeyValuePair(UniversalTransferType.MainToCoinFutures, "MAIN_CMFUTURE"), - new KeyValuePair(UniversalTransferType.MainToMargin, "MAIN_MARGIN"), - new KeyValuePair(UniversalTransferType.MainToMining, "MAIN_MINING"), - new KeyValuePair(UniversalTransferType.MainToIsolatedMargin, "MAIN_ISOLATED_MARGIN"), - - new KeyValuePair(UniversalTransferType.FundingToMain, "FUNDING_MAIN"), - new KeyValuePair(UniversalTransferType.FundingToUsdFutures, "FUNDING_UMFUTURE"), - new KeyValuePair(UniversalTransferType.FundingToMargin, "FUNDING_MARGIN"), - - new KeyValuePair(UniversalTransferType.UsdFuturesToMain, "UMFUTURE_MAIN"), - new KeyValuePair(UniversalTransferType.UsdFuturesToFunding, "UMFUTURE_FUNDING"), - new KeyValuePair(UniversalTransferType.UsdFuturesToMargin, "UMFUTURE_MARGIN"), - - new KeyValuePair(UniversalTransferType.CoinFuturesToMain, "CMFUTURE_MAIN"), - new KeyValuePair(UniversalTransferType.CoinFuturesToMargin, "CMFUTURE_MARGIN"), - - new KeyValuePair(UniversalTransferType.MarginToIsolatedMargin, "MARGIN_ISOLATEDMARGIN"), - new KeyValuePair(UniversalTransferType.IsolatedMarginToMargin, "ISOLATEDMARGIN_MARGIN"), - new KeyValuePair(UniversalTransferType.IsolatedMarginToMain, "ISOLATED_MARGIN_MAIN"), - - new KeyValuePair(UniversalTransferType.MarginToMain, "MARGIN_MAIN"), - new KeyValuePair(UniversalTransferType.MarginToUsdFutures, "MARGIN_UMFUTURE"), - new KeyValuePair(UniversalTransferType.MarginToCoinFutures, "MARGIN_CMFUTURE"), - new KeyValuePair(UniversalTransferType.MarginToMining, "MARGIN_MINING"), - new KeyValuePair(UniversalTransferType.MarginToFunding, "MARGIN_FUNDING"), - - new KeyValuePair(UniversalTransferType.MiningToMain, "MINING_MAIN"), - new KeyValuePair(UniversalTransferType.MiningToUsdFutures, "MINING_UMFUTURE"), - new KeyValuePair(UniversalTransferType.MiningToMargin, "MINING_MARGIN"), - - new KeyValuePair(UniversalTransferType.FundingToCoinFutures, "FUNDING_CMFUTURE"), - new KeyValuePair(UniversalTransferType.CoinFuturesToFunding, "CMFUTURE_FUNDING"), - new KeyValuePair(UniversalTransferType.IsolatedMarginToIsolatedMargin, "ISOLATEDMARGIN_ISOLATEDMARGIN"), - - new KeyValuePair(UniversalTransferType.MainToOption, "MAIN_OPTION"), - new KeyValuePair(UniversalTransferType.OptionToMain, "OPTION_MAIN"), - new KeyValuePair(UniversalTransferType.UsdFuturesToOption, "UMFUTURE_OPTION"), - new KeyValuePair(UniversalTransferType.OptionToUsdFutures, "OPTION_UMFUTURE"), - new KeyValuePair(UniversalTransferType.MarginToOption, "MARGIN_OPTION"), - new KeyValuePair(UniversalTransferType.OptionToMargin, "OPTION_MARGIN"), - new KeyValuePair(UniversalTransferType.FundingToOption, "FUNDING_OPTION"), - new KeyValuePair(UniversalTransferType.OptionToFunding, "OPTION_FUNDING"), - }; - } -} \ No newline at end of file diff --git a/Binance.Net/Converters/WalletTypeConverter.cs b/Binance.Net/Converters/WalletTypeConverter.cs deleted file mode 100644 index 4185b4d3d..000000000 --- a/Binance.Net/Converters/WalletTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class WalletTypeConverter : BaseConverter - { - public WalletTypeConverter() : this(true) { } - public WalletTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(WalletType.Spot, "0"), - new KeyValuePair(WalletType.Funding, "1"), - }; - } -} diff --git a/Binance.Net/Converters/WithdrawDepositTransferTypeConverter.cs b/Binance.Net/Converters/WithdrawDepositTransferTypeConverter.cs deleted file mode 100644 index 4fcdbb750..000000000 --- a/Binance.Net/Converters/WithdrawDepositTransferTypeConverter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class WithdrawDepositTransferTypeConverter : BaseConverter - { - public WithdrawDepositTransferTypeConverter() : this(true) - { - } - - public WithdrawDepositTransferTypeConverter(bool quotes) : base(quotes) - { - } - - protected override List> Mapping => - new List> - { - new KeyValuePair( - WithdrawDepositTransferType.Internal, "1"), - new KeyValuePair( - WithdrawDepositTransferType.External, "0"), - }; - } -} \ No newline at end of file diff --git a/Binance.Net/Converters/WithdrawalStatusConverter.cs b/Binance.Net/Converters/WithdrawalStatusConverter.cs deleted file mode 100644 index 3618a00bd..000000000 --- a/Binance.Net/Converters/WithdrawalStatusConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class WithdrawalStatusConverter : BaseConverter - { - public WithdrawalStatusConverter() : this(true) - { - } - - public WithdrawalStatusConverter(bool quotes) : base(quotes) - { - } - - protected override List> Mapping => new List> - { - new KeyValuePair(WithdrawalStatus.EmailSend, "0"), - new KeyValuePair(WithdrawalStatus.Canceled, "1"), - new KeyValuePair(WithdrawalStatus.AwaitingApproval, "2"), - new KeyValuePair(WithdrawalStatus.Rejected, "3"), - new KeyValuePair(WithdrawalStatus.Processing, "4"), - new KeyValuePair(WithdrawalStatus.Failure, "5"), - new KeyValuePair(WithdrawalStatus.Completed, "6") - }; - } -} diff --git a/Binance.Net/Converters/WorkingTypeConverter.cs b/Binance.Net/Converters/WorkingTypeConverter.cs deleted file mode 100644 index 7a23215f7..000000000 --- a/Binance.Net/Converters/WorkingTypeConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Binance.Net.Enums; - -namespace Binance.Net.Converters -{ - internal class WorkingTypeConverter : BaseConverter - { - public WorkingTypeConverter() : this(true) { } - public WorkingTypeConverter(bool quotes) : base(quotes) { } - - protected override List> Mapping => new List> - { - new KeyValuePair(WorkingType.Mark, "MARK_PRICE"), - new KeyValuePair(WorkingType.Contract, "CONTRACT_PRICE"), - }; - } -} diff --git a/Binance.Net/Enums/AccountType.cs b/Binance.Net/Enums/AccountType.cs index 5027bcaa9..72703e368 100644 --- a/Binance.Net/Enums/AccountType.cs +++ b/Binance.Net/Enums/AccountType.cs @@ -1,4 +1,5 @@ -using CryptoExchange.Net.Attributes; +using Binance.Net.Converters; +using CryptoExchange.Net.Attributes; namespace Binance.Net.Enums { @@ -156,6 +157,71 @@ public enum AccountType /// Trade group 27 /// [Map("TRD_GRP_027")] - TradeGroup027 + TradeGroup027, + /// + /// Trade group 28 + /// + [Map("TRD_GRP_028")] + TradeGroup028, + /// + /// Trade group 29 + /// + [Map("TRD_GRP_029")] + TradeGroup029, + /// + /// Trade group 30 + /// + [Map("TRD_GRP_030")] + TradeGroup030, + /// + /// Trade group 31 + /// + [Map("TRD_GRP_031")] + TradeGroup031, + /// + /// Trade group 32 + /// + [Map("TRD_GRP_032")] + TradeGroup032, + /// + /// Trade group 33 + /// + [Map("TRD_GRP_033")] + TradeGroup033, + /// + /// Trade group 34 + /// + [Map("TRD_GRP_034")] + TradeGroup034, + /// + /// Trade group 35 + /// + [Map("TRD_GRP_035")] + TradeGroup035, + /// + /// Trade group 36 + /// + [Map("TRD_GRP_036")] + TradeGroup036, + /// + /// Trade group 37 + /// + [Map("TRD_GRP_037")] + TradeGroup037, + /// + /// Trade group 38 + /// + [Map("TRD_GRP_038")] + TradeGroup038, + /// + /// Trade group 39 + /// + [Map("TRD_GRP_039")] + TradeGroup039, + /// + /// Trade group 40 + /// + [Map("TRD_GRP_040")] + TradeGroup040 } } diff --git a/Binance.Net/Enums/AccountUpdateReason.cs b/Binance.Net/Enums/AccountUpdateReason.cs index c24bfecf5..7f5b17c42 100644 --- a/Binance.Net/Enums/AccountUpdateReason.cs +++ b/Binance.Net/Enums/AccountUpdateReason.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Account update reason @@ -8,66 +10,87 @@ public enum AccountUpdateReason /// /// Deposit /// + [Map("DEPOSIT")] Deposit, /// /// Withdraw /// + [Map("WITHDRAW")] Withdraw, /// /// Order /// + [Map("ORDER")] Order, /// /// Funding Fee /// + [Map("FUNDING_FEE")] FundingFee, /// /// Withdraw Reject /// + [Map("WITHDRAW_REJECT")] WithdrawReject, /// /// Adjustment /// + [Map("ADJUSTMENT")] Adjustment, /// /// Insurance Clear /// + [Map("INSURANCE_CLEAR")] InsuranceClear, /// /// Admin Deposit /// + [Map("ADMIN_DEPOSIT")] AdminDeposit, /// /// Admin Withdraw /// + [Map("ADMIN_WITHDRAW")] AdminWithdraw, /// /// Margin Transfer /// + [Map("MARGIN_TRANSFER")] MarginTransfer, /// /// Margin Type Change /// + [Map("MARGIN_TYPE_CHANGE")] MarginTypeChange, /// /// Asset Transfer /// + [Map("ASSET_TRANSFER")] AssetTransfer, /// /// Options Premium Fee /// + [Map("OPTIONS_PREMIUM_FEE")] OptionsPremiumFee, /// /// Options Settle Profit /// + [Map("OPTIONS_SETTLE_PROFIT")] OptionsSettleProfit, /// + /// Auto exchange + /// + [Map("AUTO_EXCHANGE")] + AutoExchange, + /// /// Coin swap withdraw /// + [Map("COIN_SWAP_WITHDRAW")] CoinSwapWithdraw, /// /// Coin swap deposit /// + [Map("COIN_SWAP_DEPOSIT")] CoinSwapDeposit } } diff --git a/Binance.Net/Enums/AdjustRateDirection.cs b/Binance.Net/Enums/AdjustRateDirection.cs index 1c9371138..b4db4c80b 100644 --- a/Binance.Net/Enums/AdjustRateDirection.cs +++ b/Binance.Net/Enums/AdjustRateDirection.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Rate direction @@ -8,10 +10,12 @@ public enum AdjustRateDirection /// /// Additional /// + [Map("ADDITIONAL")] Additional, /// /// Reduced /// + [Map("REDUCED")] Reduced } } diff --git a/Binance.Net/Enums/AutoCloseType.cs b/Binance.Net/Enums/AutoCloseType.cs index 3f7f2b784..c92545e97 100644 --- a/Binance.Net/Enums/AutoCloseType.cs +++ b/Binance.Net/Enums/AutoCloseType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Type of auto close @@ -8,11 +10,13 @@ public enum AutoCloseType /// /// ADL /// + [Map("ADL")] ADL, /// /// Liquidation /// + [Map("LIQUIDATION")] Liquidation } } diff --git a/Binance.Net/Enums/BlvtStatus.cs b/Binance.Net/Enums/BlvtStatus.cs index 2691fe52d..a417d6328 100644 --- a/Binance.Net/Enums/BlvtStatus.cs +++ b/Binance.Net/Enums/BlvtStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Status of a blvt action @@ -8,14 +10,17 @@ public enum BlvtStatus /// /// Pending /// + [Map("P")] Pending, /// /// Success /// + [Map("S")] Success, /// /// Failure /// + [Map("F")] Failure } } diff --git a/Binance.Net/Enums/BrokerageAccountType.cs b/Binance.Net/Enums/BrokerageAccountType.cs index 5f0e21c36..b7ea0b6b3 100644 --- a/Binance.Net/Enums/BrokerageAccountType.cs +++ b/Binance.Net/Enums/BrokerageAccountType.cs @@ -1,15 +1,26 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Brokerage account type /// public enum BrokerageAccountType { - /// Spot + /// + /// Spot + /// + [Map("SPOT")] Spot, - /// Futures USDT + /// + /// Futures USDT + /// + [Map("USDT_FUTURE")] FuturesUsdt, - /// Futures Coin - FuturesCoin, + /// + /// Futures Coin + /// + [Map("COIN_FUTURE")] + FuturesCoin } } \ No newline at end of file diff --git a/Binance.Net/Enums/BrokerageTransferTransactionStatus.cs b/Binance.Net/Enums/BrokerageTransferTransactionStatus.cs index 5b390c079..4e8403a40 100644 --- a/Binance.Net/Enums/BrokerageTransferTransactionStatus.cs +++ b/Binance.Net/Enums/BrokerageTransferTransactionStatus.cs @@ -1,17 +1,31 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Brokerage transfer transaction status /// public enum BrokerageTransferTransactionStatus { - /// Init + /// + /// Init + /// + [Map("INIT")] Init, - /// Process + /// + /// Process + /// + [Map("PROCESS")] Process, - /// Success + /// + /// Success + /// + [Map("SUCCESS")] Success, - /// Failure + /// + /// Failure + /// + [Map("FAILURE")] Failure, } } \ No newline at end of file diff --git a/Binance.Net/Enums/BinanceBusdConvertType.cs b/Binance.Net/Enums/BusdConvertType.cs similarity index 95% rename from Binance.Net/Enums/BinanceBusdConvertType.cs rename to Binance.Net/Enums/BusdConvertType.cs index 07a7477a0..f7d1fca78 100644 --- a/Binance.Net/Enums/BinanceBusdConvertType.cs +++ b/Binance.Net/Enums/BusdConvertType.cs @@ -5,7 +5,7 @@ namespace Binance.Net.Enums /// /// Busd convert type /// - public enum BinanceBusdConvertType + public enum BusdConvertType { /// /// Auto convert when deposit diff --git a/Binance.Net/Enums/ContractType.cs b/Binance.Net/Enums/ContractType.cs index 42c563f4a..60a6662db 100644 --- a/Binance.Net/Enums/ContractType.cs +++ b/Binance.Net/Enums/ContractType.cs @@ -30,6 +30,7 @@ public enum ContractType /// /// Current quarter delivering /// + [Map("CURRENT_QUARTER DELIVERING")] CurrentQuarterDelivering, /// /// Next quarter @@ -39,6 +40,7 @@ public enum ContractType /// /// Next quarter delivering /// + [Map("NEXT_QUARTER DELIVERING")] NextQuarterDelivering, /// /// Next month @@ -48,6 +50,7 @@ public enum ContractType /// /// Unknown /// + [Map("")] Unknown } } diff --git a/Binance.Net/Enums/DepositStatus.cs b/Binance.Net/Enums/DepositStatus.cs index 939ec5290..aa67669c8 100644 --- a/Binance.Net/Enums/DepositStatus.cs +++ b/Binance.Net/Enums/DepositStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// The status of a deposit @@ -8,14 +10,17 @@ public enum DepositStatus /// /// Pending /// + [Map("0")] Pending, /// /// Success /// + [Map("1")] Success, /// /// Completed /// + [Map("6")] Completed } } diff --git a/Binance.Net/Enums/BinanceEarningType.cs b/Binance.Net/Enums/EarningType.cs similarity index 78% rename from Binance.Net/Enums/BinanceEarningType.cs rename to Binance.Net/Enums/EarningType.cs index 6c4876484..483a82d17 100644 --- a/Binance.Net/Enums/BinanceEarningType.cs +++ b/Binance.Net/Enums/EarningType.cs @@ -1,53 +1,66 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Mining earnings type /// - public enum BinanceEarningType + public enum EarningType { /// /// Mining wallet /// + [Map("0")] MiningWallet, /// /// Merged mining /// + [Map("1")] MergedMining, /// /// Activity bonus /// + [Map("2")] ActivityBonus, /// /// Rebate /// + [Map("3")] Rebate, /// /// Smart pool /// + [Map("4")] SmartPool, /// /// Mining address /// + [Map("5")] MiningAddress, /// /// Pool savings /// + [Map("7")] PoolSavings, /// /// Transfered /// + [Map("8")] Transfered, /// /// Income transfer /// + [Map("6", "31")] IncomeTransfer, /// /// Hashrate resale - mining wallet /// + [Map("32")] HashrateResaleMiningWallet, /// /// Hashrate resale - pool savings /// + [Map("33")] HashrateResalePoolSavings } } diff --git a/Binance.Net/Enums/ExecutionType.cs b/Binance.Net/Enums/ExecutionType.cs index 1aefcb8fa..cdbaabe4a 100644 --- a/Binance.Net/Enums/ExecutionType.cs +++ b/Binance.Net/Enums/ExecutionType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// The type of execution @@ -8,34 +10,42 @@ public enum ExecutionType /// /// New /// + [Map("NEW")] New, /// /// Canceled /// + [Map("CANCELED")] Canceled, /// /// Replaced /// + [Map("REPLACED")] Replaced, /// /// Rejected /// + [Map("REJECTED")] Rejected, /// /// Trade /// + [Map("TRADE")] Trade, /// /// Expired /// + [Map("EXPIRED")] Expired, /// /// Amendment /// + [Map("AMENDMENT")] Amendment, /// /// Self trade prevented /// + [Map("TRADE_PREVENTION")] TradePrevention } } diff --git a/Binance.Net/Enums/FiatPaymentStatus.cs b/Binance.Net/Enums/FiatPaymentStatus.cs index 7da94e5f2..c1e292eb4 100644 --- a/Binance.Net/Enums/FiatPaymentStatus.cs +++ b/Binance.Net/Enums/FiatPaymentStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Status of a fiat payment @@ -8,18 +10,22 @@ public enum FiatPaymentStatus /// /// Still processing /// + [Map("Processing")] Processing, /// /// Successfully completed /// + [Map("Completed")] Completed, /// /// Failed /// + [Map("Failed")] Failed, /// /// Refunded /// + [Map("Refunded")] Refunded } } diff --git a/Binance.Net/Enums/FiatWithdrawDepositStatus.cs b/Binance.Net/Enums/FiatWithdrawDepositStatus.cs index cb17e1265..562acb907 100644 --- a/Binance.Net/Enums/FiatWithdrawDepositStatus.cs +++ b/Binance.Net/Enums/FiatWithdrawDepositStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Status of a fiat payment @@ -8,34 +10,42 @@ public enum FiatWithdrawDepositStatus /// /// Still processing /// + [Map("Processing")] Processing, /// /// Successfully completed /// + [Map("Successful")] Successful, /// /// Failed /// + [Map("Failed")] Failed, /// /// Finished /// + [Map("Finished")] Finished, /// /// Refunding /// + [Map("Refunding")] Refunding, /// /// Refunded /// + [Map("Refunded")] Refunded, /// /// Refund failed /// + [Map("Refund Failed")] RefundFailed, /// /// Expired /// + [Map("Expired")] Expired } } diff --git a/Binance.Net/Enums/FutureTransferType.cs b/Binance.Net/Enums/FutureTransferType.cs index b38fff476..7c40e1820 100644 --- a/Binance.Net/Enums/FutureTransferType.cs +++ b/Binance.Net/Enums/FutureTransferType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Futures account transfer type @@ -8,18 +10,22 @@ public enum FuturesTransferType /// /// From spot to USDT-M futures account /// + [Map("1")] FromSpotToUsdtFutures, /// /// From USDT-M futures to spot account /// + [Map("2")] FromUsdtFuturesToSpot, /// /// From spot to COIN-M futures account /// + [Map("3")] FromSpotToCoinFutures, /// /// From COIN-M futures to spot account /// + [Map("4")] FromCoinFuturesToSpot } } diff --git a/Binance.Net/Enums/FuturesMarginChangeDirectionType.cs b/Binance.Net/Enums/FuturesMarginChangeDirectionType.cs index aca30a6a4..48c58801a 100644 --- a/Binance.Net/Enums/FuturesMarginChangeDirectionType.cs +++ b/Binance.Net/Enums/FuturesMarginChangeDirectionType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// The direction to change futures margin @@ -8,10 +10,12 @@ public enum FuturesMarginChangeDirectionType /// /// Add margin /// + [Map("1")] Add, /// /// Reduce Margin /// + [Map("2")] Reduce } } diff --git a/Binance.Net/Enums/FuturesMarginType.cs b/Binance.Net/Enums/FuturesMarginType.cs index 56b06a508..69e1a04f5 100644 --- a/Binance.Net/Enums/FuturesMarginType.cs +++ b/Binance.Net/Enums/FuturesMarginType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Type of Margin @@ -8,11 +10,12 @@ public enum FuturesMarginType /// /// Isolated margin /// + [Map("ISOLATED")] Isolated, - /// /// Crossed margin /// + [Map("CROSSED", "cross")] Cross } } diff --git a/Binance.Net/Enums/FuturesTransferStatus.cs b/Binance.Net/Enums/FuturesTransferStatus.cs index 41e34e861..0d82d601e 100644 --- a/Binance.Net/Enums/FuturesTransferStatus.cs +++ b/Binance.Net/Enums/FuturesTransferStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Status of a transfer between spot and futures account @@ -8,14 +10,17 @@ public enum FuturesTransferStatus /// /// Pending to execute /// + [Map("PENDING")] Pending, /// /// Successfully transferred /// + [Map("CONFIRMED")] Confirmed, /// /// Execution failed /// + [Map("FAILED")] Failed } } diff --git a/Binance.Net/Enums/HashrateResaleStatus.cs b/Binance.Net/Enums/HashrateResaleStatus.cs index e4f450196..2f1ef26aa 100644 --- a/Binance.Net/Enums/HashrateResaleStatus.cs +++ b/Binance.Net/Enums/HashrateResaleStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Resale status @@ -8,14 +10,17 @@ public enum HashrateResaleStatus /// /// Processing /// + [Map("0")] Processing, /// /// Canceled /// + [Map("1")] Canceled, /// /// Terminated /// + [Map("2")] Terminated } } diff --git a/Binance.Net/Enums/IncomeType.cs b/Binance.Net/Enums/IncomeType.cs index b4f216a4b..798d19fa5 100644 --- a/Binance.Net/Enums/IncomeType.cs +++ b/Binance.Net/Enums/IncomeType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Type of futures income @@ -8,78 +10,97 @@ public enum IncomeType /// /// Transfer into account /// + [Map("TRANSFER")] Transfer, /// /// Futures welcome bonus /// + [Map("WELCOME_BONUS")] WelcomeBonus, /// /// Futures realized profit /// + [Map("REALIZED_PNL")] RealizedPnl, /// /// Futures funding fee /// + [Map("FUNDING_FEE")] FundingFee, /// /// Futures trading commission /// + [Map("COMMISSION")] Commission, /// /// Insurance clear /// + [Map("INSURANCE_CLEAR")] InsuranceClear, /// /// Referral kickback /// + [Map("REFERRAL_KICKBACK")] ReferralKickback, /// /// Commission rebate /// + [Map("COMMISSION_REBATE")] CommissionRebate, /// /// Api rebate /// + [Map("API_REBATE")] ApiRebate, /// /// Contest reward /// + [Map("CONTEST_REWARD")] ContestReward, /// /// Cross collateral transfer /// + [Map("CROSS_COLLATERAL_TRANSFER")] CrossCollateralTransfer, /// /// Options premium fee /// + [Map("OPTIONS_PREMIUM_FEE")] OptionsPremiumFee, /// /// Options settle profit /// + [Map("OPTIONS_SETTLE_PROFIT")] OptionsSettleProfit, /// /// Internal transfer /// + [Map("INTERNAL_TRANSFER")] InternalTransfer, /// /// Auto exchange /// + [Map("AUTO_EXCHANGE")] AutoExchange, /// /// Delivered settlement /// + [Map("DELIVERED_SETTELMENT")] DeliveredSettlement, /// /// Coin swap deposit /// + [Map("COIN_SWAP_DEPOSIT")] CoinSwapDeposit, /// /// Coin swap withdraw /// + [Map("COIN_SWAP_WITHDRAW")] CoinSwapWithdraw, /// /// Position limit increase fee /// + [Map("POSITION_LIMIT_INCREASE_FEE")] PositionLimitIncreaseFee } } diff --git a/Binance.Net/Enums/IndicatorType.cs b/Binance.Net/Enums/IndicatorType.cs index 2567b70a8..b3a1188d3 100644 --- a/Binance.Net/Enums/IndicatorType.cs +++ b/Binance.Net/Enums/IndicatorType.cs @@ -1,24 +1,27 @@ using Binance.Net.Converters; +using CryptoExchange.Net.Attributes; namespace Binance.Net.Enums { /// /// Types of indicators /// - [JsonConverter(typeof(IndicatorTypeConverter))] public enum IndicatorType { /// /// Unfilled ratio /// + [Map("UFR")] UnfilledRatio, /// /// Expired orders ratio /// + [Map("IFER")] ExpirationRatio, /// /// Canceled orders ratio /// + [Map("GCR")] CancelationRatio } } diff --git a/Binance.Net/Enums/IsolatedMarginTransferDirection.cs b/Binance.Net/Enums/IsolatedMarginTransferDirection.cs index 8c956d7c3..5b28b3902 100644 --- a/Binance.Net/Enums/IsolatedMarginTransferDirection.cs +++ b/Binance.Net/Enums/IsolatedMarginTransferDirection.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Transfer direction for isolated margin transfer @@ -8,11 +10,12 @@ public enum IsolatedMarginTransferDirection /// /// Spot /// + [Map("SPOT")] Spot, - /// /// Isolated margin /// + [Map("ISOLATED_MARGIN")] IsolatedMargin } } diff --git a/Binance.Net/Enums/LendingType.cs b/Binance.Net/Enums/LendingType.cs index 6f26f499b..aa73b8f7a 100644 --- a/Binance.Net/Enums/LendingType.cs +++ b/Binance.Net/Enums/LendingType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Lending type @@ -8,14 +10,17 @@ public enum LendingType /// /// Flexible /// + [Map("DAILY")] Daily, /// /// Activity /// + [Map("ACTIVITY")] Activity, /// /// Customized fixed /// + [Map("CUSTOMIZED_FIXED")] CustomizedFixed } } diff --git a/Binance.Net/Enums/LiquidityType.cs b/Binance.Net/Enums/LiquidityType.cs index 595a81d0a..ffb8506e8 100644 --- a/Binance.Net/Enums/LiquidityType.cs +++ b/Binance.Net/Enums/LiquidityType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Add/Remove liquidity type @@ -8,10 +10,12 @@ public enum LiquidityType /// /// Add/Remove single asset /// + [Map("SINGLE")] Single, /// /// Add/Remove combination of all coins /// + [Map("COMBINATION")] Combined } } diff --git a/Binance.Net/Enums/ListOrderStatus.cs b/Binance.Net/Enums/ListOrderStatus.cs index b73ae553c..dda05829c 100644 --- a/Binance.Net/Enums/ListOrderStatus.cs +++ b/Binance.Net/Enums/ListOrderStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// List order status @@ -8,14 +10,17 @@ public enum ListOrderStatus /// /// Executing /// + [Map("EXECUTING")] Executing, /// /// Executed /// + [Map("REJECT")] Done, /// /// Rejected /// + [Map("ALL_DONE")] Rejected } } diff --git a/Binance.Net/Enums/ListStatusType.cs b/Binance.Net/Enums/ListStatusType.cs index a12d14743..040302ec0 100644 --- a/Binance.Net/Enums/ListStatusType.cs +++ b/Binance.Net/Enums/ListStatusType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// List status type @@ -8,14 +10,17 @@ public enum ListStatusType /// /// Failed action /// + [Map("RESPONSE")] Response, /// /// Placed /// + [Map("EXEC_STARTED")] ExecutionStarted, /// /// Order list is done /// + [Map("ALL_DONE")] Done } } diff --git a/Binance.Net/Enums/LoanIncomeType.cs b/Binance.Net/Enums/LoanIncomeType.cs index cc1f8d7b8..6473765d2 100644 --- a/Binance.Net/Enums/LoanIncomeType.cs +++ b/Binance.Net/Enums/LoanIncomeType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Income type @@ -8,30 +10,37 @@ public enum LoanIncomeType /// /// Borrow in /// + [Map("borrowIn")] BorrowIn, /// /// Collateral spent /// + [Map("collateralSpent")] CollateralSpent, /// /// Repay amount /// + [Map("repayAmount")] RepayAmount, /// /// Collateral return /// + [Map("collateralReturn")] CollateralReturn, /// /// Add collateral /// + [Map("addCollateral")] AddCollateral, /// /// Remove collateral /// + [Map("removeCollateral")] RemoveCollateral, /// /// Collateral return after liquidation /// + [Map("collateralReturnAfterLiquidation")] CollateralReturnAfterLiquidation } } diff --git a/Binance.Net/Enums/MarginLevelStatus.cs b/Binance.Net/Enums/MarginLevelStatus.cs index 4930ea8cc..b7efe4456 100644 --- a/Binance.Net/Enums/MarginLevelStatus.cs +++ b/Binance.Net/Enums/MarginLevelStatus.cs @@ -1,4 +1,6 @@  +using CryptoExchange.Net.Attributes; + namespace Binance.Net.Enums { /// @@ -9,22 +11,27 @@ public enum MarginLevelStatus /// /// Excessive /// + [Map("EXCESSIVE")] Excessive, /// /// Normal /// + [Map("NORMAL")] Normal, /// /// Margin call /// + [Map("MARGIN_CALL")] MarginCall, /// /// Pre-liquidation /// + [Map("PRE_LIQUIDATION")] PreLiquidation, /// /// Force liquidation /// + [Map("FORCE_LIQUIDATION")] ForceLiquidation } } diff --git a/Binance.Net/Enums/MarginStatus.cs b/Binance.Net/Enums/MarginStatus.cs index 3bd200430..25e4f0368 100644 --- a/Binance.Net/Enums/MarginStatus.cs +++ b/Binance.Net/Enums/MarginStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Status of a margin action @@ -8,18 +10,22 @@ public enum MarginStatus /// /// Pending to execution /// + [Map("PENDING")] Pending, /// /// Executed, waiting to be confirmed /// + [Map("COMPLETED")] Completed, /// /// Successfully loaned/repayed /// + [Map("CONFIRMED")] Confirmed, /// /// execution failed, nothing happened to your account /// + [Map("FAILED")] Failed } } diff --git a/Binance.Net/Enums/MinerStatus.cs b/Binance.Net/Enums/MinerStatus.cs index 072f5f978..a430abe79 100644 --- a/Binance.Net/Enums/MinerStatus.cs +++ b/Binance.Net/Enums/MinerStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Miner status @@ -8,18 +10,22 @@ public enum MinerStatus /// /// All miners /// + [Map("0")] All, /// /// Valid /// + [Map("1")] Valid, /// /// Invalid /// + [Map("2")] Invalid, /// /// Failure /// + [Map("3")] Failure } } diff --git a/Binance.Net/Enums/OrderRejectReason.cs b/Binance.Net/Enums/OrderRejectReason.cs index 4c38eb48e..e25115638 100644 --- a/Binance.Net/Enums/OrderRejectReason.cs +++ b/Binance.Net/Enums/OrderRejectReason.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// The reason the order was rejected @@ -8,46 +10,57 @@ public enum OrderRejectReason /// /// Not rejected /// + [Map("NONE")] None, /// /// Unknown instrument /// + [Map("UNKNOWN_INSTRUMENT")] UnknownInstrument, /// /// Closed market /// + [Map("MARKET_CLOSED")] MarketClosed, /// /// Quantity out of bounds /// + [Map("PRICE_QTY_EXCEED_HARD_LIMITS")] PriceQuantityExceedsHardLimits, /// /// Unknown order /// + [Map("UNKNOWN_ORDER")] UnknownOrder, /// /// Duplicate /// + [Map("DUPLICATE_ORDER")] DuplicateOrder, /// /// Unkown account /// + [Map("UNKNOWN_ACCOUNT")] UnknownAccount, /// /// Not enough balance /// + [Map("INSUFFICIENT_BALANCE")] InsufficientBalance, /// /// Account not active /// + [Map("ACCOUNT_INACTIVE")] AccountInactive, /// /// Cannot settle /// + [Map("ACCOUNT_CANNOT_SETTLE")] AccountCannotSettle, /// /// Stop price would trigger immediately /// + [Map("STOP_PRICE_WOULD_TRIGGER_IMMEDIATELY")] StopPriceWouldTrigger } } diff --git a/Binance.Net/Enums/OrderResponseType.cs b/Binance.Net/Enums/OrderResponseType.cs index ef21fe922..81ac8f0fa 100644 --- a/Binance.Net/Enums/OrderResponseType.cs +++ b/Binance.Net/Enums/OrderResponseType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Response type @@ -8,14 +10,17 @@ public enum OrderResponseType /// /// Ack only /// + [Map("ACK")] Acknowledge, /// /// Resulting order /// + [Map("RESULT")] Result, /// /// Full order info, only valid on SPOT orders /// + [Map("FULL")] Full } } diff --git a/Binance.Net/Enums/OrderStatus.cs b/Binance.Net/Enums/OrderStatus.cs index a557fde28..c398315b4 100644 --- a/Binance.Net/Enums/OrderStatus.cs +++ b/Binance.Net/Enums/OrderStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// The status of an orderн @@ -8,46 +10,57 @@ public enum OrderStatus /// /// Order is not yet active /// + [Map("PENDING_NEW")] PendingNew, /// /// Order is new /// + [Map("NEW")] New, /// /// Order is partly filled, still has quantity left to fill /// + [Map("PARTIALLY_FILLED")] PartiallyFilled, /// /// The order has been filled and completed /// + [Map("FILLED")] Filled, /// /// The order has been canceled /// + [Map("CANCELED")] Canceled, /// /// The order is in the process of being canceled (currently unused) /// + [Map("PENDING_CANCEL")] PendingCancel, /// /// The order has been rejected /// + [Map("REJECTED")] Rejected, /// /// The order has expired /// + [Map("EXPIRED")] Expired, /// /// Liquidation with Insurance Fund /// + [Map("NEW_INSURANCE")] Insurance, /// /// Counterparty Liquidation /// + [Map("NEW_ADL")] Adl, /// /// Expired because of trigger SelfTradePrevention /// + [Map("EXPIRED_IN_MATCH")] ExpiredInMatch } } diff --git a/Binance.Net/Enums/PositionSide.cs b/Binance.Net/Enums/PositionSide.cs index c2c024d98..9d36ea777 100644 --- a/Binance.Net/Enums/PositionSide.cs +++ b/Binance.Net/Enums/PositionSide.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Position side @@ -8,14 +10,17 @@ public enum PositionSide /// /// Short /// + [Map("SHORT")] Short, /// /// Long /// + [Map("LONG")] Long, /// /// Both for One-way mode when placing an order /// + [Map("BOTH")] Both } } diff --git a/Binance.Net/Enums/ProductStatus.cs b/Binance.Net/Enums/ProductStatus.cs index a8b2722af..988ab3732 100644 --- a/Binance.Net/Enums/ProductStatus.cs +++ b/Binance.Net/Enums/ProductStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Status of a product @@ -8,14 +10,17 @@ public enum ProductStatus /// /// All products /// + [Map("ALL")] All, /// /// Products which are subscribable /// + [Map("SUBSCRIBABLE")] Subscribable, /// /// Products which are unsubscribable /// + [Map("UNSUBSCRIBABLE")] Unsubscribable } } diff --git a/Binance.Net/Enums/ProjectStatus.cs b/Binance.Net/Enums/ProjectStatus.cs index c4a4933ae..0a5fadd13 100644 --- a/Binance.Net/Enums/ProjectStatus.cs +++ b/Binance.Net/Enums/ProjectStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Project status @@ -8,10 +10,12 @@ public enum ProjectStatus /// /// Holding /// + [Map("HOLDING")] Holding, /// /// Redeemed /// + [Map("REDEEMED")] Redeemed } } diff --git a/Binance.Net/Enums/ProjectType.cs b/Binance.Net/Enums/ProjectType.cs index e8721aba4..dc3301b2f 100644 --- a/Binance.Net/Enums/ProjectType.cs +++ b/Binance.Net/Enums/ProjectType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// The type of project @@ -8,10 +10,12 @@ public enum ProjectType /// /// Regular /// + [Map("ACTIVITY")] Activity, /// /// Customized fixed /// + [Map("CUSTOMIZED_FIXED")] CustomizedFixed } } diff --git a/Binance.Net/Enums/RateLimitType.cs b/Binance.Net/Enums/RateLimitType.cs index 7da75a303..7f6b79943 100644 --- a/Binance.Net/Enums/RateLimitType.cs +++ b/Binance.Net/Enums/RateLimitType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Type of rate limit @@ -8,18 +10,22 @@ public enum RateLimitType /// /// Request weight /// + [Map("REQUEST_WEIGHT")] RequestWeight, /// /// Order amount /// + [Map("ORDERS")] Orders, /// /// Raw requests /// + [Map("RAW_REQUESTS")] RawRequests, /// /// Connections /// + [Map("CONNECTIONS")] Connections } } diff --git a/Binance.Net/Enums/RedeemType.cs b/Binance.Net/Enums/RedeemType.cs index 5b292bec9..f62b81f97 100644 --- a/Binance.Net/Enums/RedeemType.cs +++ b/Binance.Net/Enums/RedeemType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Redeem type @@ -8,10 +10,12 @@ public enum RedeemType /// /// Fast /// + [Map("FAST")] Fast, /// /// Normal /// + [Map("NORMAL")] Normal } } diff --git a/Binance.Net/Enums/SideEffectType.cs b/Binance.Net/Enums/SideEffectType.cs index 5f3667f34..47dbd7af1 100644 --- a/Binance.Net/Enums/SideEffectType.cs +++ b/Binance.Net/Enums/SideEffectType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Side effect for a margin order @@ -8,18 +10,22 @@ public enum SideEffectType /// /// Normal trade /// + [Map("NO_SIDE_EFFECT")] NoSideEffect, /// /// Margin trade order /// + [Map("MARGIN_BUY")] MarginBuy, /// /// Make auto repayment after order is filled /// + [Map("AUTO_REPAY")] AutoRepay, /// /// Automatic borrowing and repayment, simultaneously /// + [Map("AUTO_BORROW_REPAY")] AutoBorrowRepay, } } diff --git a/Binance.Net/Enums/SpotOrderType.cs b/Binance.Net/Enums/SpotOrderType.cs index 4a72b4ebd..551d8cb62 100644 --- a/Binance.Net/Enums/SpotOrderType.cs +++ b/Binance.Net/Enums/SpotOrderType.cs @@ -52,34 +52,42 @@ public enum FuturesOrderType /// /// Limit orders will be placed at a specific price. If the price isn't available in the order book for that asset the order will be added in the order book for someone to fill. /// + [Map("LIMIT")] Limit, /// /// Market order will be placed without a price. The order will be executed at the best price available at that time in the order book. /// + [Map("MARKET")] Market, /// /// Stop order. Execute a limit order when price reaches a specific Stop price /// + [Map("STOP")] Stop, /// /// Stop market order. Execute a market order when price reaches a specific Stop price /// + [Map("STOP_MARKET")] StopMarket, /// /// Take profit order. Will execute a limit order when the price rises above a price to sell and therefor take a profit /// + [Map("TAKE_PROFIT")] TakeProfit, /// /// Take profit market order. Will execute a market order when the price rises above a price to sell and therefor take a profit /// + [Map("TAKE_PROFIT_MARKET")] TakeProfitMarket, /// /// A trailing stop order will execute an order when the price drops below a certain percentage from its all time high since the order was activated /// + [Map("TRAILING_STOP_MARKET")] TrailingStopMarket, /// /// A liquidation order /// + [Map("LIQUIDATION")] Liquidation } } diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositStatus.cs b/Binance.Net/Enums/SubAccountDepositStatus.cs similarity index 56% rename from Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositStatus.cs rename to Binance.Net/Enums/SubAccountDepositStatus.cs index 2c48cf143..cfd1820bd 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositStatus.cs +++ b/Binance.Net/Enums/SubAccountDepositStatus.cs @@ -1,23 +1,28 @@ -namespace Binance.Net.Objects.Models.Spot.Brokerage.SubAccountData +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Sub Account Deposit Status /// - public enum BinanceBrokerageSubAccountDepositStatus + public enum SubAccountDepositStatus { /// /// Pending /// - Pending = 0, - + [Map("0")] + Pending, + /// /// Success /// - Success = 1, - + [Map("1")] + Success, + /// /// Credited but cannot withdraw /// - CreditedButCannotWithdraw = 6, + [Map("6")] + CreditedButCannotWithdraw, } } \ No newline at end of file diff --git a/Binance.Net/Enums/SubAccountMarginTransferType.cs b/Binance.Net/Enums/SubAccountMarginTransferType.cs index c124f6a14..d2db42e4d 100644 --- a/Binance.Net/Enums/SubAccountMarginTransferType.cs +++ b/Binance.Net/Enums/SubAccountMarginTransferType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Sub account margin transfer type @@ -8,10 +10,12 @@ public enum SubAccountMarginTransferType /// /// Sub account spot to sub account margin /// + [Map("1")] FromSubAccountSpotToSubAccountMargin, /// /// From sub account margin to sub account spot /// + [Map("2")] FromSubAccountMarginToSubAccountSpot } } diff --git a/Binance.Net/Enums/SubAccountTransferSubAccountType.cs b/Binance.Net/Enums/SubAccountTransferSubAccountType.cs index 5decabc00..9fd281633 100644 --- a/Binance.Net/Enums/SubAccountTransferSubAccountType.cs +++ b/Binance.Net/Enums/SubAccountTransferSubAccountType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Transfer type @@ -8,10 +10,12 @@ public enum SubAccountTransferSubAccountType /// /// From main spot account to sub account /// + [Map("1")] TransferIn, /// /// From sub account to main spot account /// + [Map("2")] TransferOut } } diff --git a/Binance.Net/Enums/SubAccountTransferType.cs b/Binance.Net/Enums/SubAccountTransferType.cs deleted file mode 100644 index 500a5d504..000000000 --- a/Binance.Net/Enums/SubAccountTransferType.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace Binance.Net.Enums -{ - /// - /// Transfer type - /// - public enum SubAccountFuturesTransferType - { - /// - /// From sub account spot to sub account usdt-m futures - /// - FromSpotToUsdtFutures, - /// - /// From sub account usdt-m futures to sub account spot - /// - FromUsdtFuturesToSpot, - /// - /// From sub account spot to sub account coin-m futures - /// - FromSpotToCoinFutures, - /// - /// From sub account coin-m futures to sub account spot - /// - FromCoinFuturesToSpot - } -} diff --git a/Binance.Net/Enums/SymbolFilterType.cs b/Binance.Net/Enums/SymbolFilterType.cs index ad59717be..5fcaf83bf 100644 --- a/Binance.Net/Enums/SymbolFilterType.cs +++ b/Binance.Net/Enums/SymbolFilterType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Filter type @@ -8,58 +10,72 @@ public enum SymbolFilterType /// /// Unknown filter type /// + [Map("")] Unknown, /// /// Price filter /// + [Map("PRICE_FILTER")] Price, /// /// Price percent filter /// + [Map("PERCENT_PRICE")] PricePercent, /// /// Lot size filter /// + [Map("LOT_SIZE")] LotSize, /// /// Market lot size filter /// + [Map("MARKET_LOT_SIZE")] MarketLotSize, /// /// Min notional filter /// + [Map("MIN_NOTIONAL")] MinNotional, /// /// Max orders filter /// + [Map("MAX_NUM_ORDERS")] MaxNumberOrders, /// /// Max algo orders filter /// + [Map("MAX_NUM_ALGO_ORDERS")] MaxNumberAlgorithmicOrders, /// /// Max iceberg parts filter /// + [Map("ICEBERG_PARTS")] IcebergParts, /// /// Max position filter /// + [Map("MAX_POSITION")] MaxPosition, /// /// Price filter by side /// + [Map("PERCENT_PRICE_BY_SIDE")] PercentagePriceBySide, /// /// Trailing delta filter /// , + [Map("TRAILING_DELTA")] TrailingDelta, /// /// Notional filter /// + [Map("NOTIONAL")] Notional, /// /// Max Iceberg Orders filter /// + [Map("EXCHANGE_MAX_NUM_ICEBERG_ORDERS")] IcebergOrders } } diff --git a/Binance.Net/Enums/SymbolStatus.cs b/Binance.Net/Enums/SymbolStatus.cs index 1f0c48634..e3d95a6c1 100644 --- a/Binance.Net/Enums/SymbolStatus.cs +++ b/Binance.Net/Enums/SymbolStatus.cs @@ -10,6 +10,7 @@ public enum SymbolStatus /// /// Not trading yet /// + [Map("PRE_TRADING")] PreTrading, /// /// Pending trading @@ -24,22 +25,27 @@ public enum SymbolStatus /// /// No longer trading /// + [Map("POST_TRADING")] PostTrading, /// /// Not trading /// + [Map("END_OF_DAY")] EndOfDay, /// /// Halted /// + [Map("HALT")] Halt, /// /// /// + [Map("AUCTION_MATCH")] AuctionMatch, /// /// /// + [Map("BREAK")] Break, /// /// Closed diff --git a/Binance.Net/Enums/SystemStatus.cs b/Binance.Net/Enums/SystemStatus.cs index fc3d6a480..510e56a80 100644 --- a/Binance.Net/Enums/SystemStatus.cs +++ b/Binance.Net/Enums/SystemStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Status of the Binance system @@ -8,10 +10,12 @@ public enum SystemStatus /// /// Operational /// + [Map("0")] Normal, /// /// In maintenance /// + [Map("1")] Maintenance } } diff --git a/Binance.Net/Enums/TransferAccountType.cs b/Binance.Net/Enums/TransferAccountType.cs index ab50eec04..d9ef37ffa 100644 --- a/Binance.Net/Enums/TransferAccountType.cs +++ b/Binance.Net/Enums/TransferAccountType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Transfer account type @@ -8,22 +10,27 @@ public enum TransferAccountType /// /// Spot /// + [Map("SPOT")] Spot, /// /// USDT-M future /// + [Map("USDT_FUTURE")] UsdtFuture, /// /// Coin-M future /// + [Map("COIN_FUTURE")] CoinFuture, /// /// Margin /// + [Map("MARGIN")] Margin, /// /// Isolated margin /// + [Map("ISOLATED_MARGIN")] IsolatedMargin } } diff --git a/Binance.Net/Enums/TransferDirection.cs b/Binance.Net/Enums/TransferDirection.cs index 61257f9e8..8ecc59202 100644 --- a/Binance.Net/Enums/TransferDirection.cs +++ b/Binance.Net/Enums/TransferDirection.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Direction of a transfer @@ -8,10 +10,12 @@ public enum TransferDirection /// /// Roll-in /// + [Map("ROLL_IN")] RollIn, /// /// Roll-out /// + [Map("ROLL_OUT")] RollOut } } diff --git a/Binance.Net/Enums/TransferDirectionType.cs b/Binance.Net/Enums/TransferDirectionType.cs index 19002bf90..565f7533c 100644 --- a/Binance.Net/Enums/TransferDirectionType.cs +++ b/Binance.Net/Enums/TransferDirectionType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Transfer direction @@ -8,10 +10,12 @@ public enum TransferDirectionType /// /// From main account to margin account /// + [Map("1")] MainToMargin, /// /// From margin account to main account /// + [Map("2")] MarginToMain } } diff --git a/Binance.Net/Enums/UnderlyingType.cs b/Binance.Net/Enums/UnderlyingType.cs index 991ca2678..6ef1a54af 100644 --- a/Binance.Net/Enums/UnderlyingType.cs +++ b/Binance.Net/Enums/UnderlyingType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Underlying Type @@ -8,10 +10,12 @@ public enum UnderlyingType /// /// Coin /// + [Map("COIN")] Coin, /// /// Index /// + [Map("INDEX")] Index } } diff --git a/Binance.Net/Enums/UniversalTransferType.cs b/Binance.Net/Enums/UniversalTransferType.cs index 27beea894..cd101b8c6 100644 --- a/Binance.Net/Enums/UniversalTransferType.cs +++ b/Binance.Net/Enums/UniversalTransferType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Universal transfer type @@ -8,153 +10,189 @@ public enum UniversalTransferType /// /// Main (spot) to Funding /// + [Map("MAIN_FUNDING")] MainToFunding, /// /// Main (spot) to Usd Futures /// + [Map("MAIN_UMFUTURE")] MainToUsdFutures, /// /// Main (spot) to Coin Futures /// + [Map("MAIN_CMFUTURE")] MainToCoinFutures, /// /// Main (spot) to Margin /// + [Map("MAIN_MARGIN")] MainToMargin, /// /// Main (spot) to Mining /// + [Map("MAIN_MINING")] MainToMining, /// /// Main to isolated margin /// + [Map("MAIN_ISOLATED_MARGIN")] MainToIsolatedMargin, /// /// Funding to Main (spot) /// + [Map("FUNDING_MAIN")] FundingToMain, /// /// Funding to Usd futures /// + [Map("FUNDING_UMFUTURE")] FundingToUsdFutures, /// /// Funding to margin /// + [Map("FUNDING_MARGIN")] FundingToMargin, /// /// Usd futures to Main (spot) /// + [Map("UMFUTURE_MAIN")] UsdFuturesToMain, /// /// Usd futures to Funding /// + [Map("UMFUTURE_FUNDING")] UsdFuturesToFunding, /// /// Usd futures to Margin /// + [Map("UMFUTURE_MARGIN")] UsdFuturesToMargin, /// /// Coin futures to Main (spot) /// + [Map("CMFUTURE_MAIN")] CoinFuturesToMain, /// /// Coin futures to Margin /// + [Map("CMFUTURE_MARGIN")] CoinFuturesToMargin, /// /// Margin to Main (spot) /// + [Map("MARGIN_MAIN")] MarginToMain, /// /// Margin to Usd futures /// + [Map("MARGIN_UMFUTURE")] MarginToUsdFutures, /// /// Margin to Coin futures /// + [Map("MARGIN_CMFUTURE")] MarginToCoinFutures, /// /// Margin to Mining /// + [Map("MARGIN_MINING")] MarginToMining, /// /// Margin to Funding /// + [Map("MARGIN_FUNDING")] MarginToFunding, /// /// Isolated margin to margin /// + [Map("ISOLATEDMARGIN_MARGIN")] IsolatedMarginToMargin, /// /// Margin to isolated margin /// + [Map("MARGIN_ISOLATEDMARGIN")] MarginToIsolatedMargin, /// /// Isolated margin to Isolated margin /// + [Map("ISOLATEDMARGIN_ISOLATEDMARGIN")] IsolatedMarginToIsolatedMargin, /// /// Isolated margin to main /// + [Map("ISOLATED_MARGIN_MAIN")] IsolatedMarginToMain, /// /// Mining to Main (spot) /// + [Map("MINING_MAIN")] MiningToMain, /// /// Mining to Usd futures /// + [Map("MINING_UMFUTURE")] MiningToUsdFutures, /// /// Mining to Margin /// + [Map("MINING_MARGIN")] MiningToMargin, /// /// Funding to Coin futures /// + [Map("FUNDING_CMFUTURE")] FundingToCoinFutures, /// /// Coin futures to Funding /// + [Map("CMFUTURE_FUNDING")] CoinFuturesToFunding, /// /// Main to Option /// + [Map("MAIN_OPTION")] MainToOption, /// /// Option to Main /// + [Map("OPTION_MAIN")] OptionToMain, /// /// Usd Futures to Option /// + [Map("UMFUTURE_OPTION")] UsdFuturesToOption, /// /// Option to Usd Futures /// + [Map("OPTION_UMFUTURE")] OptionToUsdFutures, /// /// Margin to Option /// + [Map("MARGIN_OPTION")] MarginToOption, /// /// Option to Margin /// + [Map("OPTION_MARGIN")] OptionToMargin, /// /// Funding to Option /// + [Map("FUNDING_OPTION")] FundingToOption, /// /// Option to Funding /// + [Map("OPTION_FUNDING")] OptionToFunding } } \ No newline at end of file diff --git a/Binance.Net/Enums/WithdrawDepositTransferType.cs b/Binance.Net/Enums/WithdrawDepositTransferType.cs index 89422d389..fb64b327f 100644 --- a/Binance.Net/Enums/WithdrawDepositTransferType.cs +++ b/Binance.Net/Enums/WithdrawDepositTransferType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Transfer type @@ -8,10 +10,12 @@ public enum WithdrawDepositTransferType /// /// Internal transfer /// + [Map("1")] Internal, /// /// External transfer /// + [Map("0")] External } } diff --git a/Binance.Net/Enums/WithdrawalStatus.cs b/Binance.Net/Enums/WithdrawalStatus.cs index e506cb2de..d7c20e624 100644 --- a/Binance.Net/Enums/WithdrawalStatus.cs +++ b/Binance.Net/Enums/WithdrawalStatus.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// The status of a withdrawal @@ -8,30 +10,37 @@ public enum WithdrawalStatus /// /// Email has been send /// + [Map("0")] EmailSend, /// /// Withdrawal has been canceled /// + [Map("1")] Canceled, /// /// Withdrawal is awaiting approval /// + [Map("2")] AwaitingApproval, /// /// Withdrawal has been rejected /// + [Map("3")] Rejected, /// /// Withdrawal is processing /// + [Map("4")] Processing, /// /// Withdrawal has failed /// + [Map("5")] Failure, /// /// Withdrawal has been processed /// + [Map("6")] Completed } } diff --git a/Binance.Net/Enums/WorkingType.cs b/Binance.Net/Enums/WorkingType.cs index 9b54c5eea..77f52e57d 100644 --- a/Binance.Net/Enums/WorkingType.cs +++ b/Binance.Net/Enums/WorkingType.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Enums +using CryptoExchange.Net.Attributes; + +namespace Binance.Net.Enums { /// /// Type of working @@ -8,10 +10,12 @@ public enum WorkingType /// /// Mark price type /// + [Map("MARK_PRICE")] Mark, /// /// Contract price type /// + [Map("CONTRACT_PRICE")] Contract } } diff --git a/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiBrokerage.cs b/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiBrokerage.cs index f1f7203bc..b766eb8eb 100644 --- a/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiBrokerage.cs +++ b/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiBrokerage.cs @@ -326,7 +326,7 @@ Task> TransferAsync(string asset, /// The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request /// Cancellation token /// Transfer result - Task> TransferFuturesAsync(string asset, decimal quantity, BinanceBrokerageFuturesType futuresType, + Task> TransferFuturesAsync(string asset, decimal quantity, FuturesAccountType futuresType, string? fromId, string? toId, string? clientTransferId = null, int? receiveWindow = null, CancellationToken ct = default); /// @@ -362,7 +362,7 @@ Task>> GetTransfe /// Cancellation token /// Transfer history Task> GetTransferFuturesHistoryAsync(string subAccountId, - BinanceBrokerageFuturesType futuresType, DateTime? startDate = null, DateTime? endDate = null, + FuturesAccountType futuresType, DateTime? startDate = null, DateTime? endDate = null, int? page = null, int? limit = null, string? clientTransferId = null, int? receiveWindow = null, CancellationToken ct = default); /// @@ -381,7 +381,7 @@ Task> GetTransferFutu /// Cancellation token /// Task>> GetSubAccountDepositHistoryAsync(string? subAccountId = null, - string? coin = null, BinanceBrokerageSubAccountDepositStatus? status = null, DateTime? startDate = null, DateTime? endDate = null, + string? coin = null, SubAccountDepositStatus? status = null, DateTime? startDate = null, DateTime? endDate = null, int? limit = null, int? offset = null, int? receiveWindow = null, CancellationToken ct = default); /// @@ -410,7 +410,7 @@ Task>> GetBrokerCommissionReba /// The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request /// Cancellation token /// Rebate records - Task>> GetBrokerFuturesCommissionRebatesHistoryAsync(BinanceBrokerageFuturesType futuresType, + Task>> GetBrokerFuturesCommissionRebatesHistoryAsync(FuturesAccountType futuresType, DateTime startDate, DateTime endDate, int? page = null, int? size = null, int? receiveWindow = null, CancellationToken ct = default); /// @@ -482,7 +482,7 @@ Task> GetSubAccountMarginAssetInf /// The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request /// Cancellation token /// Asset info - Task> GetSubAccountFuturesAssetInfoAsync(BinanceBrokerageFuturesType futuresType, + Task> GetSubAccountFuturesAssetInfoAsync(FuturesAccountType futuresType, string? subAccountId = null, int? page = null, int? size = null, int? receiveWindow = null, CancellationToken ct = default); } } diff --git a/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiSubAccount.cs b/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiSubAccount.cs index b8b63710c..a6e8b5485 100644 --- a/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiSubAccount.cs +++ b/Binance.Net/Interfaces/Clients/GeneralApi/IBinanceRestClientGeneralApiSubAccount.cs @@ -202,7 +202,7 @@ public interface IBinanceRestClientGeneralApiSubAccount /// The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request /// Cancellation token /// The result of the transfer - Task> TransferSubAccountFuturesAsync(string email, string asset, decimal quantity, SubAccountFuturesTransferType type, int? receiveWindow = null, CancellationToken ct = default); + Task> TransferSubAccountFuturesAsync(string email, string asset, decimal quantity, FuturesTransferType type, int? receiveWindow = null, CancellationToken ct = default); /// /// Transfers from or to a margin sub account diff --git a/Binance.Net/Interfaces/Clients/SpotApi/IBinanceRestClientSpotApiAccount.cs b/Binance.Net/Interfaces/Clients/SpotApi/IBinanceRestClientSpotApiAccount.cs index 8ff8a908f..745e31dc9 100644 --- a/Binance.Net/Interfaces/Clients/SpotApi/IBinanceRestClientSpotApiAccount.cs +++ b/Binance.Net/Interfaces/Clients/SpotApi/IBinanceRestClientSpotApiAccount.cs @@ -863,5 +863,15 @@ Task> DisableIsolatedMarginAcco /// Cancellation token /// Task> GetAccountVipLevelAndStatusAsync(int? receiveWindow = null, CancellationToken ct = default); + + /// + /// Get current account commission rates. + /// + /// + /// Symbol + /// The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request + /// Cancellation token + /// + Task> GetCommissionRatesAsync(string symbol, int? receiveWindow = null, CancellationToken ct = default); } } diff --git a/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.cs b/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.cs index 85610c6ce..62fc0744e 100644 --- a/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.cs +++ b/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiAccount.cs @@ -10,7 +10,7 @@ namespace Binance.Net.Interfaces.Clients.UsdFuturesApi public interface IBinanceRestClientUsdFuturesApiAccount { /// - /// Gets account information + /// DEPRECATED; USE Trading.GetPositionsAsync INSTEAD /// /// /// Symbol @@ -124,13 +124,11 @@ Task>> GetPositionAd string? symbol = null, long? receiveWindow = null, CancellationToken ct = default); /// - /// Gets account information, including balances - /// + /// Get account information, including position and balances + /// /// - /// The receive window for which this request is active. When the request takes longer than this to complete the server will reject the request /// Cancellation token - /// The account information - Task> GetAccountInfoAsync(long? receiveWindow = null, CancellationToken ct = default); + Task> GetAccountInfoAsync(CancellationToken ct = default); /// . /// Gets account balances @@ -295,5 +293,21 @@ Task>> GetPositionAd /// Cancellation token /// Task SetBnbBurnStatusAsync(bool feeBurn, long? receiveWindow = null, CancellationToken ct = default); + + /// + /// Get user symbol configuration + /// + /// + /// Filter by symbol + /// Cancellation token + Task>> GetSymbolConfigurationAsync(string? symbol = null, CancellationToken ct = default); + + /// + /// Get user account configuration + /// + /// + /// Cancellation token + Task> GetAccountConfigurationAsync(CancellationToken ct = default); + } } diff --git a/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.cs b/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.cs index c74fa2681..ccb4c87b5 100644 --- a/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.cs +++ b/Binance.Net/Interfaces/Clients/UsdFuturesApi/IBinanceRestClientUsdFuturesApiTrading.cs @@ -338,5 +338,13 @@ Task> PlaceTimeWeightedAveragePriceOrderAs /// Task> GetAlgoSubOrdersAsync(long algoId, int? page = null, int? limit = null, long? receiveWindow = null, CancellationToken ct = default); + /// + /// Get position information + /// + /// + /// Filter by symbol + /// Cancellation token + Task>> GetPositionsAsync(string? symbol = null, CancellationToken ct = default); + } } diff --git a/Binance.Net/Objects/BinanceApiAddresses.cs b/Binance.Net/Objects/BinanceApiAddresses.cs index ee7502c3f..f7c556451 100644 --- a/Binance.Net/Objects/BinanceApiAddresses.cs +++ b/Binance.Net/Objects/BinanceApiAddresses.cs @@ -8,15 +8,15 @@ public class BinanceApiAddresses /// /// The address used by the BinanceClient for the Spot API /// - public string RestClientAddress { get; set; } = ""; + public string RestClientAddress { get; set; } = string.Empty; /// /// The address used by the BinanceSocketClient for the Spot streams /// - public string SocketClientStreamAddress { get; set; } = ""; + public string SocketClientStreamAddress { get; set; } = string.Empty; /// /// The address used by the BinanceSocketClient for the Spot API /// - public string SocketClientApiAddress { get; set; } = ""; + public string SocketClientApiAddress { get; set; } = string.Empty; /// /// The address used by the BinanceSocketClient for connecting to the BLVT streams /// diff --git a/Binance.Net/Objects/BinanceResponse.cs b/Binance.Net/Objects/BinanceResponse.cs index 7d32569cc..3d11141c0 100644 --- a/Binance.Net/Objects/BinanceResponse.cs +++ b/Binance.Net/Objects/BinanceResponse.cs @@ -10,19 +10,23 @@ public class BinanceResponse /// /// Identifier /// + [JsonPropertyName("id")] public int Id { get; set; } /// /// Result status /// + [JsonPropertyName("status")] public int Status { get; set; } /// /// Error info /// + [JsonPropertyName("error")] public BinanceResponseError? Error { get; set; } /// /// Rate limit info /// + [JsonPropertyName("rateLimits")] public IEnumerable Ratelimits { get; set; } = new List(); } @@ -36,6 +40,7 @@ public class BinanceResponse : BinanceResponse /// /// Data result /// + [JsonPropertyName("result")] public T Result { get; set; } = default!; } @@ -47,17 +52,17 @@ public class BinanceResponseError /// /// Error code /// - [JsonProperty("code")] + [JsonPropertyName("code")] public int Code { get; set; } /// /// Error message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; /// /// Error data /// - [JsonProperty("data")] + [JsonPropertyName("data")] public BinanceResponseErrorData? Data { get; set; } } @@ -69,12 +74,12 @@ public class BinanceResponseErrorData /// /// Server time /// - [JsonProperty("serverTime")] + [JsonPropertyName("serverTime")] public DateTime? ServerTime { get; set; } /// /// Retry after time /// - [JsonProperty("retryAfter")] + [JsonPropertyName("retryAfter")] public DateTime? RetryAfter { get; set; } } } diff --git a/Binance.Net/Objects/Internal/BinanceExchangeApiWrapper.cs b/Binance.Net/Objects/Internal/BinanceExchangeApiWrapper.cs index 6ccd65db1..60a08d570 100644 --- a/Binance.Net/Objects/Internal/BinanceExchangeApiWrapper.cs +++ b/Binance.Net/Objects/Internal/BinanceExchangeApiWrapper.cs @@ -2,12 +2,17 @@ { internal class BinanceExchangeApiWrapper { + [JsonPropertyName("code")] public int Code { get; set; } + [JsonPropertyName("message")] public string Message { get; set; } = string.Empty; + [JsonPropertyName("messageDetail")] public string MessageDetail { get; set; } = string.Empty; + [JsonPropertyName("data")] public T Data { get; set; } = default!; + [JsonPropertyName("success")] public bool Success { get; set; } } } diff --git a/Binance.Net/Objects/Internal/BinanceSnapshotWrapper.cs b/Binance.Net/Objects/Internal/BinanceSnapshotWrapper.cs index 9f0d6cddf..132d1ebd5 100644 --- a/Binance.Net/Objects/Internal/BinanceSnapshotWrapper.cs +++ b/Binance.Net/Objects/Internal/BinanceSnapshotWrapper.cs @@ -2,10 +2,11 @@ { internal class BinanceSnapshotWrapper { + [JsonPropertyName("code")] public int Code { get; set; } - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; - [JsonProperty("snapshotVos")] + [JsonPropertyName("snapshotVos")] public T SnapshotData { get; set; } = default!; } } diff --git a/Binance.Net/Objects/Internal/BinanceSocketRequest.cs b/Binance.Net/Objects/Internal/BinanceSocketRequest.cs index 97f608a61..97ee792a6 100644 --- a/Binance.Net/Objects/Internal/BinanceSocketRequest.cs +++ b/Binance.Net/Objects/Internal/BinanceSocketRequest.cs @@ -2,22 +2,22 @@ { internal class BinanceSocketMessage { - [JsonProperty("method")] - public string Method { get; set; } = ""; + [JsonPropertyName("method")] + public string Method { get; set; } = string.Empty; - [JsonProperty("id")] + [JsonPropertyName("id")] public int Id { get; set; } } internal class BinanceSocketRequest : BinanceSocketMessage { - [JsonProperty("params")] + [JsonPropertyName("params")] public string[] Params { get; set; } = Array.Empty(); } internal class BinanceSocketQuery : BinanceSocketMessage { - [JsonProperty("params")] + [JsonPropertyName("params")] public Dictionary Params { get; set; } = new Dictionary(); } } diff --git a/Binance.Net/Objects/Models/Binance24HPriceBase.cs b/Binance.Net/Objects/Models/Binance24HPriceBase.cs index d1f353459..58f4c591a 100644 --- a/Binance.Net/Objects/Models/Binance24HPriceBase.cs +++ b/Binance.Net/Objects/Models/Binance24HPriceBase.cs @@ -10,40 +10,47 @@ public abstract record Binance24HPriceBase : IBinance24HPrice /// /// The symbol the price is for /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The actual price change in the last 24 hours /// + [JsonPropertyName("priceChange")] public decimal PriceChange { get; set; } /// /// The price change in percentage in the last 24 hours /// + [JsonPropertyName("priceChangePercent")] public decimal PriceChangePercent { get; set; } /// /// The weighted average price in the last 24 hours /// - [JsonProperty("weightedAvgPrice")] + [JsonPropertyName("weightedAvgPrice")] public decimal WeightedAveragePrice { get; set; } /// /// The most recent trade price /// + [JsonPropertyName("lastPrice")] public decimal LastPrice { get; set; } /// /// The most recent trade quantity /// - [JsonProperty("lastQty")] + [JsonPropertyName("lastQty")] public decimal LastQuantity { get; set; } /// /// The open price 24 hours ago /// + [JsonPropertyName("openPrice")] public decimal OpenPrice { get; set; } /// /// The highest price in the last 24 hours /// + [JsonPropertyName("highPrice")] public decimal HighPrice { get; set; } /// /// The lowest price in the last 24 hours /// + [JsonPropertyName("lowPrice")] public decimal LowPrice { get; set; } /// /// The base volume traded in the last 24 hours @@ -57,26 +64,28 @@ public abstract record Binance24HPriceBase : IBinance24HPrice /// Time at which this 24 hours opened /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("openTime")] public DateTime OpenTime { get; set; } /// /// Time at which this 24 hours closed /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("closeTime")] public DateTime CloseTime { get; set; } /// /// The first trade ID in the last 24 hours /// - [JsonProperty("firstId")] + [JsonPropertyName("firstId")] public long FirstTradeId { get; set; } /// /// The last trade ID in the last 24 hours /// - [JsonProperty("lastId")] + [JsonPropertyName("lastId")] public long LastTradeId { get; set; } /// /// The amount of trades made in the last 24 hours /// - [JsonProperty("count")] + [JsonPropertyName("count")] public long TotalTrades { get; set; } } } diff --git a/Binance.Net/Objects/Models/BinanceCombinedStream.cs b/Binance.Net/Objects/Models/BinanceCombinedStream.cs index 62595b863..399cbfc5d 100644 --- a/Binance.Net/Objects/Models/BinanceCombinedStream.cs +++ b/Binance.Net/Objects/Models/BinanceCombinedStream.cs @@ -11,13 +11,13 @@ public record BinanceCombinedStream /// /// The stream combined /// - [JsonProperty("stream")] + [JsonPropertyName("stream")] public string Stream { get; set; } = string.Empty; /// /// The data of stream /// - [JsonProperty("data")] + [JsonPropertyName("data")] public T Data { get; set; } = default!; } } diff --git a/Binance.Net/Objects/Models/BinanceOrderBase.cs b/Binance.Net/Objects/Models/BinanceOrderBase.cs index 5f11565ea..44ab7fdb2 100644 --- a/Binance.Net/Objects/Models/BinanceOrderBase.cs +++ b/Binance.Net/Objects/Models/BinanceOrderBase.cs @@ -11,27 +11,30 @@ public record BinanceOrderBase /// /// The symbol the order is for /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The order id generated by Binance /// - [JsonProperty("orderId")] + [JsonPropertyName("orderId")] public long Id { get; set; } /// /// Id of the order list this order belongs to /// + [JsonPropertyName("orderListId")] public long OrderListId { get; set; } /// /// Original order id /// - [JsonProperty("origClientOrderId")] + [JsonPropertyName("origClientOrderId")] public string OriginalClientOrderId { get; set; } = string.Empty; /// /// The order id as assigned by the client /// + [JsonPropertyName("clientOrderId")] public string ClientOrderId { get; set; } = string.Empty; private decimal _price; @@ -39,6 +42,7 @@ public record BinanceOrderBase /// /// The price of the order /// + [JsonPropertyName("price")] public decimal Price { get @@ -53,83 +57,88 @@ public decimal Price /// /// The original quantity of the order, as specified in the order parameters by the user /// - [JsonProperty("origQty")] + [JsonPropertyName("origQty")] public decimal Quantity { get; set; } /// /// The currently executed quantity of the order /// - [JsonProperty("executedQty")] + [JsonPropertyName("executedQty")] public decimal QuantityFilled { get; set; } /// /// The currently executed amount of quote asset. Amounts to Sum(quantity * price) of executed trades for this order /// - [JsonProperty("cummulativeQuoteQty")] + [JsonPropertyName("cummulativeQuoteQty")] public decimal QuoteQuantityFilled { get; set; } /// /// The original quote order quantity of the order, as specified in the order parameters by the user /// - [JsonProperty("origQuoteOrderQty")] + [JsonPropertyName("origQuoteOrderQty")] public decimal QuoteQuantity { get; set; } /// /// The status of the order /// - [JsonConverter(typeof(OrderStatusConverter))] + [JsonPropertyName("status")] public OrderStatus Status { get; set; } /// /// How long the order is active /// - [JsonConverter(typeof(TimeInForceConverter))] + [JsonPropertyName("timeInForce")] public TimeInForce TimeInForce { get; set; } /// /// The type of the order /// - [JsonConverter(typeof(SpotOrderTypeConverter))] + [JsonPropertyName("type")] public SpotOrderType Type { get; set; } /// /// The side of the order /// - [JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("side")] public OrderSide Side { get; set; } /// /// The stop price /// + [JsonPropertyName("stopPrice")] public decimal? StopPrice { get; set; } /// /// The iceberg quantity /// - [JsonProperty("icebergQty")] + [JsonPropertyName("icebergQty")] public decimal? IcebergQuantity { get; set; } /// /// The time the order was submitted /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime CreateTime { get; set; } /// /// The time the order was last updated /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime? UpdateTime { get; set; } /// /// The time the transaction was executed (when canceling order) /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("transactTime")] public DateTime? TransactTime { get; set; } /// /// When the order started working /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("workingTime")] + [JsonPropertyName("workingTime")] public DateTime? WorkingTime { get; set; } /// /// Is working /// + [JsonPropertyName("isWorking")] public bool? IsWorking { get; set; } /// /// If isolated margin (for margin account orders) /// + [JsonPropertyName("isIsolated")] public bool? IsIsolated { get; set; } /// /// Quantity which is still open to be filled @@ -153,7 +162,7 @@ public decimal? AverageFillPrice /// /// Self trade prevention mode /// - [JsonProperty("selfTradePreventionMode"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("selfTradePreventionMode"), JsonConverter(typeof(EnumConverter))] public SelfTradePreventionMode SelfTradePreventionMode { get; set; } } } diff --git a/Binance.Net/Objects/Models/BinanceQueryRecords.cs b/Binance.Net/Objects/Models/BinanceQueryRecords.cs index dc5d4d1af..6f3583291 100644 --- a/Binance.Net/Objects/Models/BinanceQueryRecords.cs +++ b/Binance.Net/Objects/Models/BinanceQueryRecords.cs @@ -9,10 +9,12 @@ public record BinanceQueryRecords /// /// The list records /// + [JsonPropertyName("rows")] public IEnumerable Rows { get; set; } = Array.Empty(); /// /// The total count of the records /// + [JsonPropertyName("total")] public int Total { get; set; } } } diff --git a/Binance.Net/Objects/Models/BinanceRateLimit.cs b/Binance.Net/Objects/Models/BinanceRateLimit.cs index 784ec589e..b37c00ee9 100644 --- a/Binance.Net/Objects/Models/BinanceRateLimit.cs +++ b/Binance.Net/Objects/Models/BinanceRateLimit.cs @@ -11,20 +11,22 @@ public record BinanceRateLimit /// /// The interval the rate limit uses to count /// + [JsonPropertyName("interval")] public RateLimitInterval Interval { get; set; } /// /// The type the rate limit applies to /// - [JsonProperty("rateLimitType"), JsonConverter(typeof(RateLimitConverter))] + [JsonPropertyName("rateLimitType")] public RateLimitType Type { get; set; } /// /// The amount of calls the limit is /// - [JsonProperty("intervalNum")] + [JsonPropertyName("intervalNum")] public int IntervalNumber { get; set; } /// /// The amount of calls the limit is /// + [JsonPropertyName("limit")] public int Limit { get; set; } } } diff --git a/Binance.Net/Objects/Models/BinanceResult.cs b/Binance.Net/Objects/Models/BinanceResult.cs index 84fade0a8..a247ba8c6 100644 --- a/Binance.Net/Objects/Models/BinanceResult.cs +++ b/Binance.Net/Objects/Models/BinanceResult.cs @@ -8,11 +8,12 @@ public record BinanceResult /// /// Result code /// + [JsonPropertyName("code")] public int Code { get; set; } /// /// Message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; } @@ -25,6 +26,7 @@ internal record BinanceResult: BinanceResult /// /// The data /// + [JsonPropertyName("data")] public T Data { get; set; } = default!; } } diff --git a/Binance.Net/Objects/Models/BinanceRollingWindowTick.cs b/Binance.Net/Objects/Models/BinanceRollingWindowTick.cs index dcc37d144..4d129956a 100644 --- a/Binance.Net/Objects/Models/BinanceRollingWindowTick.cs +++ b/Binance.Net/Objects/Models/BinanceRollingWindowTick.cs @@ -8,55 +8,62 @@ public record BinanceRollingWindowTick /// /// The symbol this data is for /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The current close price. This is the latest price for this symbol. /// + [JsonPropertyName("lastPrice")] public decimal LastPrice { get; set; } /// /// Tick open price /// + [JsonPropertyName("openPrice")] public decimal OpenPrice { get; set; } /// /// Tick high price /// + [JsonPropertyName("highPrice")] public decimal HighPrice { get; set; } /// /// Tick low price /// + [JsonPropertyName("lowPrice")] public decimal LowPrice { get; set; } /// /// The first trade id of the tick /// - [JsonProperty("firstId")] + [JsonPropertyName("firstId")] public long FirstTradeId { get; set; } /// /// The last trade id of the tick /// - [JsonProperty("lastId")] + [JsonPropertyName("lastId")] public long LastTradeId { get; set; } /// /// The total trades of id /// - [JsonProperty("count")] + [JsonPropertyName("count")] public long TotalTrades { get; set; } /// /// The open time of these stats /// - [JsonProperty("openTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("openTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime OpenTime { get; set; } /// /// The close time of these stats /// - [JsonProperty("closeTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("closeTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime CloseTime { get; set; } /// /// Volume /// + [JsonPropertyName("volume")] public decimal Volume { get; set; } /// /// Quote volume /// + [JsonPropertyName("quoteVolume")] public decimal QuoteVolume { get; set; } } } diff --git a/Binance.Net/Objects/Models/BinanceStreamEvent.cs b/Binance.Net/Objects/Models/BinanceStreamEvent.cs index f9d70d2e2..0946fa9d3 100644 --- a/Binance.Net/Objects/Models/BinanceStreamEvent.cs +++ b/Binance.Net/Objects/Models/BinanceStreamEvent.cs @@ -8,12 +8,12 @@ public record BinanceStreamEvent /// /// The type of the event /// - [JsonProperty("e")] + [JsonPropertyName("e")] public string Event { get; set; } = string.Empty; /// /// The time the event happened /// - [JsonProperty("E"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("E"), JsonConverter(typeof(DateTimeConverter))] public DateTime EventTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrder.cs b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrder.cs index 2ff692503..1a56a8ec0 100644 --- a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrder.cs +++ b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrder.cs @@ -1,5 +1,6 @@ using Binance.Net.Converters; using Binance.Net.Enums; +using CryptoExchange.Net.Attributes; namespace Binance.Net.Objects.Models.Futures.AlgoOrders { @@ -11,10 +12,12 @@ public record BinanceAlgoOrders /// /// Total items /// + [JsonPropertyName("total")] public int Total { get; set; } /// /// Orders /// + [JsonPropertyName("orders")] public IEnumerable Orders { get; set; } = Array.Empty(); } @@ -26,67 +29,75 @@ public record BinanceAlgoOrder /// /// Algo id /// + [JsonPropertyName("algoId")] public long AlgoId { get; set; } /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Order side /// - [JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("side")] public OrderSide Side { get; set; } /// /// Position side /// - [JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("positionSide")] public PositionSide? PositionSide { get; set; } /// /// Total quantity /// - [JsonProperty("totalQty")] + [JsonPropertyName("totalQty")] public decimal TotalQuantity { get; set; } /// /// Executed quantity /// - [JsonProperty("executedQty")] + [JsonPropertyName("executedQty")] public decimal ExecutedQuantity { get; set; } /// /// exceuted amount /// - [JsonProperty("executedAmt")] + [JsonPropertyName("executedAmt")] public decimal ExecutedAmount { get; set; } /// /// Average price /// - [JsonProperty("avgPrice")] + [JsonPropertyName("avgPrice")] public decimal AveragePrice { get; set; } /// /// Client algo id /// + [JsonPropertyName("clientAlgoId")] public string ClientAlgoId { get; set; } = string.Empty; /// /// Book time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("bookTime")] public DateTime BookTime { get; set; } /// /// End time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("endTime")] public DateTime? EndTime { get; set; } /// /// Status /// + [JsonPropertyName("algoStatus")] public string AlgoStatus { get; set; } = string.Empty; /// /// Algo type /// + [JsonPropertyName("algoType")] public string AlgoType { get; set; } = string.Empty; /// /// Urgency /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("urgency")] public OrderUrgency? Urgency { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrderResult.cs b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrderResult.cs index 24e959935..939a45a4f 100644 --- a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrderResult.cs +++ b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoOrderResult.cs @@ -8,10 +8,12 @@ public record BinanceAlgoOrderResult: BinanceResult /// /// Order id /// + [JsonPropertyName("clientAlgoId")] public string ClientAlgoId { get; set; } = string.Empty; /// /// Successful /// + [JsonPropertyName("success")] public bool Success { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoResult.cs b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoResult.cs index e90e8e498..2350847b1 100644 --- a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoResult.cs +++ b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoResult.cs @@ -8,10 +8,12 @@ public record BinanceAlgoResult: BinanceResult /// /// Algo order id /// + [JsonPropertyName("algoId")] public long AlgoId { get; set; } /// /// Successful /// + [JsonPropertyName("success")] public bool Success { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoSubOrder.cs b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoSubOrder.cs index 813ad83ab..0685a3a2c 100644 --- a/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoSubOrder.cs +++ b/Binance.Net/Objects/Models/Futures/AlgoOrders/BinanceAlgoSubOrder.cs @@ -11,20 +11,22 @@ public record BinanceAlgoSubOrderList /// /// Amount of sub orders /// + [JsonPropertyName("total")] public int Total { get; set; } /// /// Executed quantity /// - [JsonProperty("executedQty")] + [JsonPropertyName("executedQty")] public decimal ExecutedQuantity { get; set; } /// /// Executed amount /// - [JsonProperty("executedAmt")] + [JsonPropertyName("executedAmt")] public decimal ExecutedAmount { get; set; } /// /// Sub orders /// + [JsonPropertyName("subOrders")] public IEnumerable SubOrders { get; set; } = Array.Empty(); } @@ -36,67 +38,73 @@ public record BinanceAlgoSubOrder /// /// Algo id /// + [JsonPropertyName("algoId")] public long AlgoId { get; set; } /// /// Order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// Order status /// - [JsonProperty("orderStatus")] - [JsonConverter(typeof(OrderStatusConverter))] + [JsonPropertyName("orderStatus")] public OrderStatus Status { get; set; } /// /// Executed quantity /// - [JsonProperty("executedQty")] + [JsonPropertyName("executedQty")] public decimal ExecutedQuantity { get; set; } /// /// Exceuted amount /// - [JsonProperty("executedAmt")] + [JsonPropertyName("executedAmt")] public decimal ExecutedAmount { get; set; } /// /// Fee amount /// - [JsonProperty("feeAmt")] + [JsonPropertyName("feeAmt")] public decimal FeeAmount { get; set; } /// /// Fee asset /// + [JsonPropertyName("feeAsset")] public string FeeAsset { get; set; } = string.Empty; /// /// Book time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("bookTime")] public DateTime BookTime { get; set; } /// /// Average price /// - [JsonProperty("avgPrice")] + [JsonPropertyName("avgPrice")] public decimal AveragePrice { get; set; } /// /// Side /// - [JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("side")] public OrderSide Side { get; set; } /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Sub id /// + [JsonPropertyName("subId")] public long SubId { get; set; } /// /// Time in force /// + [JsonPropertyName("timeInForce")] public string TimeInForce { get; set; } = string.Empty; /// /// Original quantity /// - [JsonProperty("origQty")] + [JsonPropertyName("origQty")] public decimal OriginalQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceBnbBurnStatus.cs b/Binance.Net/Objects/Models/Futures/BinanceBnbBurnStatus.cs index ce9a3deb1..c636461ba 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceBnbBurnStatus.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceBnbBurnStatus.cs @@ -12,7 +12,7 @@ public record BinanceBnbBurnStatus /// /// Fee burn status /// - [JsonProperty("feeBurn")] + [JsonPropertyName("feeBurn")] public bool FeeBurn { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountAsset.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountAsset.cs index 8eeeb481b..d0e1f532c 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountAsset.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountAsset.cs @@ -8,74 +8,85 @@ public record BinanceFuturesAccountAsset /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Initial Margin /// + [JsonPropertyName("initialMargin")] public decimal InitialMargin { get; set; } /// /// Maint Margin /// + [JsonPropertyName("mainMargin")] public decimal MaintMargin { get; set; } /// /// Margin Balance /// + [JsonPropertyName("marginBalance")] public decimal MarginBalance { get; set; } /// /// Maximum Withdraw Quantity /// - [JsonProperty("maxWithdrawAmount")] + [JsonPropertyName("maxWithdrawAmount")] public decimal MaxWithdrawQuantity { get; set; } /// /// Open Order Initial Margin /// + [JsonPropertyName("openOrderInitialMargin")] public decimal OpenOrderInitialMargin { get; set; } /// /// Position Initial Margin /// + [JsonPropertyName("positionInitialMargin")] public decimal PositionInitialMargin { get; set; } /// /// Unrealized Profit /// - [JsonProperty("unrealizedProfit")] + [JsonPropertyName("unrealizedProfit")] public decimal UnrealizedPnl { get; set; } /// /// Wallet Balance /// + [JsonPropertyName("walletBalance")] public decimal WalletBalance { get; set; } /// /// Crossed Wallet Balance /// + [JsonPropertyName("crossWalletBalance")] public decimal CrossWalletBalance { get; set; } /// /// Unrealized profit of crossed positions /// - [JsonProperty("crossUnPnl")] + [JsonPropertyName("crossUnPnl")] public decimal CrossUnrealizedPnl { get; set; } /// /// Available balance /// + [JsonPropertyName("availableBalance")] public decimal AvailableBalance { get; set; } /// /// Whether the asset can be used as margin in Multi-Assets mode /// + [JsonPropertyName("marginAvailable")] public bool? MarginAvailable { get; set; } /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime? UpdateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountBalance.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountBalance.cs index f056a8075..80ec6251d 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountBalance.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountBalance.cs @@ -8,38 +8,43 @@ public record BinanceFuturesAccountBalance /// /// Account alias /// + [JsonPropertyName("accountAlias")] public string AccountAlias { get; set; } = string.Empty; /// /// The asset this balance is for /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The total balance of this asset /// - [JsonProperty("balance")] + [JsonPropertyName("balance")] public decimal WalletBalance { get; set; } /// /// Crossed wallet balance /// + [JsonPropertyName("crossWalletBalance")] public decimal CrossWalletBalance { get; set; } /// /// Unrealized profit of crossed positions /// - [JsonProperty("crossUnPnl")] + [JsonPropertyName("crossUnPnl")] public decimal CrossUnrealizedPnl { get; set; } /// /// Available balance /// + [JsonPropertyName("availableBalance")] public decimal AvailableBalance { get; set; } /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } @@ -51,12 +56,13 @@ public record BinanceUsdFuturesAccountBalance : BinanceFuturesAccountBalance /// /// Maximum quantity for transfer out /// - [JsonProperty("maxWithdrawAmount")] + [JsonPropertyName("maxWithdrawAmount")] public decimal MaxWithdrawQuantity { get; set; } /// /// Whether the asset can be used as margin in Multi-Assets mode /// + [JsonPropertyName("marginAvailable")] public bool? MarginAvailable { get; set; } } @@ -68,6 +74,7 @@ public record BinanceCoinFuturesAccountBalance : BinanceFuturesAccountBalance /// /// Available for withdraw /// + [JsonPropertyName("withdrawAvailable")] public decimal WithdrawAvailable { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountConfiguration.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountConfiguration.cs new file mode 100644 index 000000000..f1ca4269b --- /dev/null +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountConfiguration.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Binance.Net.Objects.Models.Futures +{ + /// + /// Account configuration + /// + public record BinanceFuturesAccountConfiguration + { + /// + /// Fee tier + /// + [JsonPropertyName("feeTier")] + public int FeeTier { get; set; } + /// + /// Can trade + /// + [JsonPropertyName("canTrade")] + public bool CanTrade { get; set; } + /// + /// Can deposit + /// + [JsonPropertyName("canDeposit")] + public bool CanDeposit { get; set; } + /// + /// Can withdraw + /// + [JsonPropertyName("canWithdraw")] + public bool CanWithdraw { get; set; } + /// + /// Dual side position + /// + [JsonPropertyName("dualSidePosition")] + public bool DualSidePosition { get; set; } + /// + /// Update time + /// + [JsonPropertyName("updateTime")] + public DateTime? UpdateTime { get; set; } + /// + /// Multi assets margin + /// + [JsonPropertyName("multiAssetsMargin")] + public bool MultiAssetsMargin { get; set; } + /// + /// Trade group id + /// + [JsonPropertyName("tradeGroupId")] + public long TradeGroupId { get; set; } + } + + +} diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfo.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfo.cs index 81d950dce..2905cd587 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfo.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfo.cs @@ -8,105 +8,121 @@ public record BinanceFuturesAccountInfo /// /// Information about an account assets /// + [JsonPropertyName("assets")] public IEnumerable Assets { get; set; } = Array.Empty(); /// /// Boolean indicating if this account can deposit /// + [JsonPropertyName("canDeposit")] public bool CanDeposit { get; set; } /// /// Boolean indicating if this account can trade /// + [JsonPropertyName("canTrade")] public bool CanTrade { get; set; } /// /// Boolean indicating if this account can withdraw /// + [JsonPropertyName("canWithdraw")] public bool CanWithdraw { get; set; } /// /// Boolean indicating if this account is in multi asset mode /// - [JsonProperty("multiAssetsMargin")] + [JsonPropertyName("multiAssetsMargin")] public bool MultiAssetsMargin { get; set; } /// /// Trade group id /// - [JsonProperty("tradeGroupId")] + [JsonPropertyName("tradeGroupId")] public int TradeGroupId { get; set; } /// /// Fee tier /// + [JsonPropertyName("feeTier")] public int FeeTier { get; set; } /// /// Maximum withdraw quantity /// - [JsonProperty("maxWithdrawAmount")] + [JsonPropertyName("maxWithdrawAmount")] public decimal MaxWithdrawQuantity { get; set; } /// /// Information about an account positions /// + [JsonPropertyName("positions")] public IEnumerable Positions { get; set; } = Array.Empty(); /// /// Total initial margin /// + [JsonPropertyName("totalInitialMargin")] public decimal TotalInitialMargin { get; set; } /// /// Total maint margin /// + [JsonPropertyName("totalMainMargin")] public decimal TotalMaintMargin { get; set; } /// /// Total margin balance /// + [JsonPropertyName("totalMarginBalance")] public decimal TotalMarginBalance { get; set; } /// /// Total open order initial margin /// + [JsonPropertyName("totalOpenOrderInitialMargin")] public decimal TotalOpenOrderInitialMargin { get; set; } /// /// Total positional initial margin /// + [JsonPropertyName("totalPositionInitialMargin")] public decimal TotalPositionInitialMargin { get; set; } /// /// Total unrealized profit /// + [JsonPropertyName("totalUnrealizedProfit")] public decimal TotalUnrealizedProfit { get; set; } /// /// Total wallet balance /// + [JsonPropertyName("totalWalletBalance")] public decimal TotalWalletBalance { get; set; } /// /// Total crossed wallet balance /// + [JsonPropertyName("totalCrossWalletBalance")] public decimal TotalCrossWalletBalance { get; set; } /// /// Unrealized profit of crossed positions /// + [JsonPropertyName("totalCrossUnPnl")] public decimal TotalCrossUnPnl { get; set; } /// /// Available balance /// + [JsonPropertyName("availableBalance")] public decimal AvailableBalance { get; set; } /// /// The time of account info was updated /// - [JsonProperty("updateTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime? UpdateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfoV3.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfoV3.cs new file mode 100644 index 000000000..4d11654e1 --- /dev/null +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountInfoV3.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Binance.Net.Enums; + +namespace Binance.Net.Objects.Models.Futures +{ + /// + /// Account info + /// + public record BinanceFuturesAccountInfoV3 + { + /// + /// Total initial margin + /// + [JsonPropertyName("totalInitialMargin")] + public decimal TotalInitialMargin { get; set; } + /// + /// Total maintenance margin + /// + [JsonPropertyName("totalMaintMargin")] + public decimal TotalMaintenanceMargin { get; set; } + /// + /// Total wallet balance + /// + [JsonPropertyName("totalWalletBalance")] + public decimal TotalWalletBalance { get; set; } + /// + /// Total unrealized profit + /// + [JsonPropertyName("totalUnrealizedProfit")] + public decimal TotalUnrealizedProfit { get; set; } + /// + /// Total margin balance + /// + [JsonPropertyName("totalMarginBalance")] + public decimal TotalMarginBalance { get; set; } + /// + /// Total position initial margin + /// + [JsonPropertyName("totalPositionInitialMargin")] + public decimal TotalPositionInitialMargin { get; set; } + /// + /// Total open order initial margin + /// + [JsonPropertyName("totalOpenOrderInitialMargin")] + public decimal TotalOpenOrderInitialMargin { get; set; } + /// + /// Total cross wallet balance + /// + [JsonPropertyName("totalCrossWalletBalance")] + public decimal TotalCrossWalletBalance { get; set; } + /// + /// Total cross unrealized profit and loss + /// + [JsonPropertyName("totalCrossUnPnl")] + public decimal TotalCrossUnrealizedPnl { get; set; } + /// + /// Available balance + /// + [JsonPropertyName("availableBalance")] + public decimal AvailableBalance { get; set; } + /// + /// Max withdraw quantity + /// + [JsonPropertyName("maxWithdrawAmount")] + public decimal MaxWithdrawQuantity { get; set; } + /// + /// Assets + /// + [JsonPropertyName("assets")] + public IEnumerable Assets { get; set; } = Array.Empty(); + /// + /// Positions + /// + [JsonPropertyName("positions")] + public IEnumerable Positions { get; set; } = Array.Empty(); + } + + /// + /// Asset information + /// + public record BinanceFuturesAccountInfoAsset + { + /// + /// Asset + /// + [JsonPropertyName("asset")] + public string Asset { get; set; } = string.Empty; + /// + /// Wallet balance + /// + [JsonPropertyName("walletBalance")] + public decimal WalletBalance { get; set; } + /// + /// Unrealized profit + /// + [JsonPropertyName("unrealizedProfit")] + public decimal UnrealizedProfit { get; set; } + /// + /// Margin balance + /// + [JsonPropertyName("marginBalance")] + public decimal MarginBalance { get; set; } + /// + /// Maintenance margin + /// + [JsonPropertyName("maintMargin")] + public decimal MaintenanceMargin { get; set; } + /// + /// Initial margin + /// + [JsonPropertyName("initialMargin")] + public decimal InitialMargin { get; set; } + /// + /// Position initial margin + /// + [JsonPropertyName("positionInitialMargin")] + public decimal PositionInitialMargin { get; set; } + /// + /// Open order initial margin + /// + [JsonPropertyName("openOrderInitialMargin")] + public decimal OpenOrderInitialMargin { get; set; } + /// + /// Cross wallet balance + /// + [JsonPropertyName("crossWalletBalance")] + public decimal CrossWalletBalance { get; set; } + /// + /// Cross unrealized profit and loss + /// + [JsonPropertyName("crossUnPnl")] + public decimal CrossUnrealizedPnl { get; set; } + /// + /// Available balance + /// + [JsonPropertyName("availableBalance")] + public decimal AvailableBalance { get; set; } + /// + /// Max withdraw quantity + /// + [JsonPropertyName("maxWithdrawAmount")] + public decimal MaxWithdrawQuantity { get; set; } + /// + /// Update time + /// + [JsonPropertyName("updateTime")] + public DateTime UpdateTime { get; set; } + } + + /// + /// Position info + /// + public record BinanceFuturesAccountInfoPosition + { + /// + /// Symbol + /// + [JsonPropertyName("symbol")] + public string Symbol { get; set; } = string.Empty; + /// + /// Position side + /// + [JsonPropertyName("positionSide")] + public PositionSide PositionSide { get; set; } + /// + /// Position amount + /// + [JsonPropertyName("positionAmt")] + public decimal PositionAmount { get; set; } + /// + /// Unrealized profit + /// + [JsonPropertyName("unrealizedProfit")] + public decimal UnrealizedProfit { get; set; } + /// + /// Isolated margin + /// + [JsonPropertyName("isolatedMargin")] + public decimal IsolatedMargin { get; set; } + /// + /// Notional + /// + [JsonPropertyName("notional")] + public decimal Notional { get; set; } + /// + /// Isolated wallet + /// + [JsonPropertyName("isolatedWallet")] + public decimal IsolatedWallet { get; set; } + /// + /// Initial margin + /// + [JsonPropertyName("initialMargin")] + public decimal InitialMargin { get; set; } + /// + /// Maintenance margin + /// + [JsonPropertyName("maintMargin")] + public decimal MaintenanceMargin { get; set; } + /// + /// Update time + /// + [JsonPropertyName("updateTime")] + public DateTime? UpdateTime { get; set; } + } + + +} diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountUserCommissionRate.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountUserCommissionRate.cs index 6e5456f80..8dc3b4f0b 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountUserCommissionRate.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesAccountUserCommissionRate.cs @@ -8,14 +8,17 @@ public record BinanceFuturesAccountUserCommissionRate /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Maker commission rate /// + [JsonPropertyName("makerCommissionRate")] public decimal MakerCommissionRate { get; set; } /// /// Taker commission rate /// + [JsonPropertyName("takerCommissionRate")] public decimal TakerCommissionRate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesAssetIndex.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesAssetIndex.cs index 216823453..980feb231 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesAssetIndex.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesAssetIndex.cs @@ -8,51 +8,57 @@ public record BinanceFuturesAssetIndex /// /// The symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Index /// + [JsonPropertyName("index")] public decimal Index { get; set; } /// /// Bid buffer /// + [JsonPropertyName("bidBuffer")] public decimal BidBuffer { get; set; } /// /// Ask buffer /// + [JsonPropertyName("askBuffer")] public decimal AskBuffer { get; set; } /// /// Bid price /// - [JsonProperty("bidRate")] + [JsonPropertyName("bidRate")] public decimal BidPrice { get; set; } /// /// Ask price /// - [JsonProperty("askRate")] + [JsonPropertyName("askRate")] public decimal AskPrice { get; set; } /// /// Auto exchange bid buffer /// + [JsonPropertyName("autoExchangeBidBuffer")] public decimal AutoExchangeBidBuffer { get; set; } /// /// Auto exchange ask buffer /// + [JsonPropertyName("autoExchangeAskBuffer")] public decimal AutoExchangeAskBuffer { get; set; } /// /// Auto exchange bid price /// - [JsonProperty("autoExchangeBidRate")] + [JsonPropertyName("autoExchangeBidRate")] public decimal AutoExchangeBidPrice { get; set; } /// /// Auto exchange ask price /// - [JsonProperty("autoExchangeAskRate")] + [JsonPropertyName("autoExchangeAskRate")] public decimal AutoExchangeAskPrice { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesBasis.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesBasis.cs index 0abf9724b..70505f56d 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesBasis.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesBasis.cs @@ -11,37 +11,43 @@ public record BinanceFuturesBasis /// /// The pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// /// Contract type /// - [JsonConverter(typeof(ContractTypeConverter))] + [JsonPropertyName("contractType")] public ContractType ContractType { get; set; } /// /// Futures price /// + [JsonPropertyName("futuresPrice")] public decimal FuturesPrice { get; set; } /// /// Index price /// + [JsonPropertyName("indexPrice")] public decimal IndexPrice { get; set; } /// /// Basis /// + [JsonPropertyName("basis")] public decimal Basis { get; set; } /// /// Basis rate /// + [JsonPropertyName("basisRate")] public decimal BasisRate { get; set; } /// /// Annualized basis rate /// - [JsonProperty("annualizedBasisRate")] + [JsonPropertyName("annualizedBasisRate")] public decimal? AnnualizedBasisRate { get; set; } /// /// Data timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesBookPrice.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesBookPrice.cs index 6e29d2be3..5fa11938a 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesBookPrice.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesBookPrice.cs @@ -10,6 +10,7 @@ public record BinanceFuturesBookPrice: BinanceBookPrice /// /// Pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesBuySellVolumeRatio.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesBuySellVolumeRatio.cs index dd13d3a12..1ccb19596 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesBuySellVolumeRatio.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesBuySellVolumeRatio.cs @@ -8,24 +8,25 @@ public record BinanceFuturesBuySellVolumeRatio /// /// buy/sell ratio /// + [JsonPropertyName("buySellRatio")] public decimal BuySellRatio { get; set; } /// /// buy volume /// - [JsonProperty("buyVol")] + [JsonPropertyName("buyVol")] public decimal BuyVolume { get; set; } /// /// sell volume /// - [JsonProperty("sellVol")] + [JsonPropertyName("sellVol")] public decimal SellVolume { get; set; } /// /// Timestamp /// - [JsonProperty("timestamp"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp"), JsonConverter(typeof(DateTimeConverter))] public DateTime? Timestamp { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesCancelAllOrders.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesCancelAllOrders.cs index 316163419..2535101cb 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesCancelAllOrders.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesCancelAllOrders.cs @@ -8,13 +8,13 @@ public record BinanceFuturesCancelAllOrders /// /// The execution code /// - [JsonProperty("code")] + [JsonPropertyName("code")] public int Code { get; set; } /// /// The execution message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesChangeMarginType.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesChangeMarginType.cs index 33666f752..18d7a3982 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesChangeMarginType.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesChangeMarginType.cs @@ -8,11 +8,12 @@ public record BinanceFuturesChangeMarginTypeResult /// /// Response code /// + [JsonPropertyName("code")] public int Code { get; set; } /// /// Response message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string? Message { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoin24HPrice.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoin24HPrice.cs index 245e82af4..4510eb8e0 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoin24HPrice.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoin24HPrice.cs @@ -8,13 +8,14 @@ public record BinanceFuturesCoin24HPrice : Binance24HPriceBase /// /// The pair the price is for /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// - [JsonProperty("baseVolume")] + [JsonPropertyName("baseVolume")] public override decimal Volume { get; set; } /// - [JsonProperty("volume")] + [JsonPropertyName("volume")] public override decimal QuoteVolume { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinAccountInfo.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinAccountInfo.cs index 3e68fe6db..bdaadc852 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinAccountInfo.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinAccountInfo.cs @@ -8,36 +8,44 @@ public record BinanceFuturesCoinAccountInfo /// /// Can deposit /// + [JsonPropertyName("canDeposit")] public bool CanDeposit { get; set; } /// /// Can trade /// + [JsonPropertyName("canTrade")] public bool CanTrade { get; set; } /// /// Can withdraw /// + [JsonPropertyName("canWithdraw")] public bool CanWithdraw { get; set; } /// /// Fee tier /// + [JsonPropertyName("feeTier")] public int FeeTier { get; set; } /// /// Update tier /// + [JsonPropertyName("updateTier")] public int UpdateTier { get; set; } /// /// Account assets /// + [JsonPropertyName("assets")] public IEnumerable Assets { get; set; } = Array.Empty(); /// /// Account positions /// + [JsonPropertyName("positions")] public IEnumerable Positions { get; set; } = Array.Empty(); /// /// Update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinBuySellVolumeRatio.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinBuySellVolumeRatio.cs index fa62c9568..5c25f20f9 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinBuySellVolumeRatio.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinBuySellVolumeRatio.cs @@ -11,36 +11,38 @@ public record BinanceFuturesCoinBuySellVolumeRatio /// /// The pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// /// Contract type /// - [JsonConverter(typeof(ContractTypeConverter))] + [JsonPropertyName("contractType")] public ContractType ContractType { get; set; } /// /// The taker buy volume /// - [JsonProperty("takerBuyVol")] + [JsonPropertyName("takerBuyVol")] public decimal TakerBuyVolume { get; set; } /// /// The taker sell volume /// - [JsonProperty("takerSellVol")] + [JsonPropertyName("takerSellVol")] public decimal TakerSellVolume { get; set; } /// /// The taker buy value /// - [JsonProperty("takerBuyVolValue")] + [JsonPropertyName("takerBuyVolValue")] public decimal TakerBuyVolumeValue { get; set; } /// /// The taker sell value /// - [JsonProperty("takerSellVolValue")] + [JsonPropertyName("takerSellVolValue")] public decimal TakerSellVolumeValue { get; set; } /// /// Data timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinOpenInterestHistory.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinOpenInterestHistory.cs index b280e1df0..56e487b03 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinOpenInterestHistory.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesCoinOpenInterestHistory.cs @@ -11,28 +11,31 @@ public record BinanceFuturesCoinOpenInterestHistory /// /// The symbol the information is about /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// /// Contract type /// - [JsonConverter(typeof(ContractTypeConverter))] + [JsonPropertyName("contractType")] public ContractType ContractType { get; set; } /// /// Total open interest /// + [JsonPropertyName("sumOpenInterest")] public decimal SumOpenInterest { get; set; } /// /// Total open interest value /// + [JsonPropertyName("sumOpenInterestValue")] public decimal SumOpenInterestValue { get; set; } /// /// Timestamp /// - [JsonProperty("timestamp"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp"), JsonConverter(typeof(DateTimeConverter))] public DateTime? Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesCompositeIndexInfo.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesCompositeIndexInfo.cs index 9b1dc2691..bbe323e0d 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesCompositeIndexInfo.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesCompositeIndexInfo.cs @@ -8,22 +8,24 @@ public record BinanceFuturesCompositeIndexInfo /// /// The symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Timestamp /// - [JsonConverter(typeof(DateTimeConverter)), JsonProperty("time")] + [JsonConverter(typeof(DateTimeConverter)), JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Component asset /// + [JsonPropertyName("component")] public string Component { get; set; } = string.Empty; /// /// Base asset list /// - [JsonProperty("baseAssetList")] + [JsonPropertyName("baseAssetList")] public IEnumerable BaseAssets { get; set; } = Array.Empty(); } @@ -35,18 +37,22 @@ public record BinanceFuturesCompositeIndexInfoAsset /// /// Base asset name /// + [JsonPropertyName("baseAsset")] public string BaseAsset { get; set; } = string.Empty; /// /// Quote asset name /// + [JsonPropertyName("quoteAsset")] public string QuoteAsset { get; set; } = string.Empty; /// /// Weight in quantity /// + [JsonPropertyName("weightInQuantity")] public decimal WeightInQuantity { get; set; } /// /// Weight in percentage /// + [JsonPropertyName("weightInPercentage")] public decimal WeightInPercentage { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesCountDownResult.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesCountDownResult.cs index a34be1388..059296c00 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesCountDownResult.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesCountDownResult.cs @@ -8,10 +8,12 @@ public record BinanceFuturesCountDownResult /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Count down time in milliseconds /// + [JsonPropertyName("countdownTime")] public int CountDownTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadIdInfo.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadIdInfo.cs index cd2d438c4..39986c26d 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadIdInfo.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadIdInfo.cs @@ -8,11 +8,12 @@ public record BinanceFuturesDownloadIdInfo /// /// Average time taken for data download in the past 30 days /// - [JsonProperty("avgCostTimestampOfLast30d")] + [JsonPropertyName("avgCostTimestampOfLast30d")] public long AverageCostTimestampOfLast30Days { get; set; } /// /// Download id /// + [JsonPropertyName("downloadId")] public string DownloadId { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadLink.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadLink.cs index 6eba6cf8a..3daa437c0 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadLink.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesDownloadLink.cs @@ -10,24 +10,28 @@ public record BinanceFuturesDownloadLink /// /// Download id /// + [JsonPropertyName("downloadId")] public string DownloadId { get; set; } = string.Empty; /// /// Is ready to download /// + [JsonPropertyName("status")] public DownloadStatus Status { get; set; } /// /// Download url /// + [JsonPropertyName("url")] public string Url { get; set; } = string.Empty; /// /// Link expiration time /// - [JsonProperty("expirationTimestamp")] + [JsonPropertyName("expirationTimestamp")] [JsonConverter(typeof(DateTimeConverter))] public DateTime ExpirationTime { get; set; } /// /// Is expired /// + [JsonPropertyName("isExpired")] public bool? IsExpired { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesExchangeInfo.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesExchangeInfo.cs index 2706713e9..639ef5242 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesExchangeInfo.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesExchangeInfo.cs @@ -8,19 +8,23 @@ public record BinanceFuturesExchangeInfo /// /// The timezone the server uses /// + [JsonPropertyName("timezone")] public string TimeZone { get; set; } = string.Empty; /// /// The current server time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("serverTime")] public DateTime ServerTime { get; set; } /// /// The rate limits used /// + [JsonPropertyName("rateLimits")] public IEnumerable RateLimits { get; set; } = Array.Empty(); /// /// Filters /// + [JsonPropertyName("exchangeFilters")] public IEnumerable ExchangeFilters { get; set; } = Array.Empty(); } @@ -32,11 +36,13 @@ public record BinanceFuturesUsdtExchangeInfo: BinanceFuturesExchangeInfo /// /// All symbols supported /// + [JsonPropertyName("symbols")] public IEnumerable Symbols { get; set; } = Array.Empty(); /// /// All assets /// + [JsonPropertyName("assets")] public IEnumerable Assets { get; set; } = Array.Empty(); } @@ -48,6 +54,7 @@ public record BinanceFuturesCoinExchangeInfo : BinanceFuturesExchangeInfo /// /// All symbols supported /// + [JsonPropertyName("symbols")] public IEnumerable Symbols { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingInfo.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingInfo.cs index ec4216709..616108fc8 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingInfo.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingInfo.cs @@ -8,22 +8,22 @@ public record BinanceFuturesFundingInfo /// /// The symbol the information is about /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Adjusted funding rate cap /// - [JsonProperty("adjustedFundingRateCap")] + [JsonPropertyName("adjustedFundingRateCap")] public decimal AdjustedFundingRateCap { get; set; } /// /// Adjusted funding rate floor /// - [JsonProperty("adjustedFundingRateFloor")] + [JsonPropertyName("adjustedFundingRateFloor")] public decimal AdjustedFundingRateFloor { get; set; } /// /// Funding interval in hours /// - [JsonProperty("fundingIntervalHours")] + [JsonPropertyName("fundingIntervalHours")] public int FundingIntervalHours { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingRateHistory.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingRateHistory.cs index f25d4f2f5..6f2d6db7a 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingRateHistory.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesFundingRateHistory.cs @@ -8,20 +8,23 @@ public record BinanceFuturesFundingRateHistory /// /// The symbol the information is about /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The finding rate for the given symbol and time /// + [JsonPropertyName("fundingRate")] public decimal FundingRate { get; set; } /// /// The time the funding rate is applied /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("fundingTime")] public DateTime FundingTime { get; set; } /// /// The mark price /// - [JsonProperty("markPrice")] + [JsonPropertyName("markPrice")] public decimal? MarkPrice { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesIncomeHistory.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesIncomeHistory.cs index add68ed2b..d07763b61 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesIncomeHistory.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesIncomeHistory.cs @@ -1,5 +1,7 @@ using Binance.Net.Converters; using Binance.Net.Enums; +using CryptoExchange.Net.Converters.SystemTextJson; +using System.Text.Json.Serialization; namespace Binance.Net.Objects.Models.Futures { @@ -11,47 +13,48 @@ public record BinanceFuturesIncomeHistory /// /// Symbol for the resulting income history, may be null if not associated with a trading pair /// + [JsonPropertyName("symbol")] public string? Symbol { get; set; } /// /// Type of income as string /// - [JsonProperty("incomeType")] - public string? IncomeTypeString { get; set; } - - /// - /// Type of income - /// - public IncomeType? IncomeType => IncomeTypeString != null ? new IncomeTypeConverter().ReadString(IncomeTypeString): (IncomeType?)null; + [JsonPropertyName("incomeType")] + public IncomeType? IncomeType { get; set; } /// /// Quantity of income /// + [JsonPropertyName("income")] public decimal Income { get; set; } /// /// Base asset for the income /// + [JsonPropertyName("asset")] public string? Asset { get; set; } /// /// Additional info /// + [JsonPropertyName("info")] public string? Info { get; set; } /// /// Time of the income /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Transaction id if relevant /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public string TransactionId { get; set; } = string.Empty; /// /// Trade id if existing /// - public string TradeId { get; set; } = string.Empty; + [JsonPropertyName("tradeId")] + [JsonConverter(typeof(NumberStringConverter))] + public string? TradeId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesInitialLeverageChangeResult.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesInitialLeverageChangeResult.cs index 587c40ea7..6756f9cd4 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesInitialLeverageChangeResult.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesInitialLeverageChangeResult.cs @@ -8,22 +8,25 @@ public record BinanceFuturesInitialLeverageChangeResult /// /// New leverage multiplier /// + [JsonPropertyName("leverage")] public int Leverage { get; set; } /// /// Maximum value that can be held /// NOTE: string type, because the value van be 'inf' (infinite) /// + [JsonPropertyName("maxNotionalValue")] public string? MaxNotionalValue { get; set; } - + /// /// Max quantity /// - [JsonProperty("maxQty")] + [JsonPropertyName("maxQty")] public string? MaxQuantity { get; set; } /// /// Symbol the request is for /// + [JsonPropertyName("symbol")] public string? Symbol { get; set; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesLongShortRatio.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesLongShortRatio.cs index d01578464..3a64c0327 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesLongShortRatio.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesLongShortRatio.cs @@ -8,25 +8,27 @@ public record BinanceFuturesLongShortRatio /// /// The symbol or pair the information is about /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string SymbolPair { get; set; } = string.Empty; /// /// Pair /// + [JsonPropertyName("pair")] public string? Pair { get; set; } = string.Empty; /// /// long/short ratio /// + [JsonPropertyName("longShortRatio")] public decimal LongShortRatio { get; set; } /// /// longs percentage (in decimal form) /// - [JsonProperty("longAccount")] + [JsonPropertyName("longAccount")] public decimal LongAccount { get; set; } - [JsonProperty("longPosition")] + [JsonPropertyName("longPosition")] private decimal LongPosition { set => LongAccount = value; @@ -35,9 +37,9 @@ private decimal LongPosition /// /// shorts percentage (in decimal form) /// - [JsonProperty("shortAccount")] + [JsonPropertyName("shortAccount")] public decimal ShortAccount { get; set; } - [JsonProperty("shortPosition")] + [JsonPropertyName("shortPosition")] private decimal ShortPosition { set => ShortAccount = value; @@ -45,7 +47,7 @@ private decimal ShortPosition /// /// Timestamp /// - [JsonProperty("timestamp"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp"), JsonConverter(typeof(DateTimeConverter))] public DateTime? Timestamp { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesMarginChangeHistoryResult.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesMarginChangeHistoryResult.cs index 9ee009143..53725794d 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesMarginChangeHistoryResult.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesMarginChangeHistoryResult.cs @@ -11,36 +11,38 @@ public record BinanceFuturesMarginChangeHistoryResult /// /// Request quantity of margin used /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Base asset used for margin /// + [JsonPropertyName("asset")] public string? Asset { get; set; } /// /// Symbol margin is placed on /// + [JsonPropertyName("symbol")] public string? Symbol { get; set; } /// /// Delta type /// - [JsonProperty("deltaType")] + [JsonPropertyName("deltaType")] public string? DeltaType { get; set; } /// /// Time of the margin change request /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Direction of the margin change request /// - [JsonConverter(typeof(FuturesMarginChangeDirectionTypeConverter))] + [JsonPropertyName("type")] public FuturesMarginChangeDirectionType Type { get; set; } /// /// Position side /// - [JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("positionSide")] public PositionSide PositionSide { get; set; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesMarkPrice.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesMarkPrice.cs index 240353598..4021cf93c 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesMarkPrice.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesMarkPrice.cs @@ -10,39 +10,45 @@ public record BinanceFuturesMarkPrice : IBinanceFuturesMarkPrice /// /// The symbol the information is about /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The current market price /// + [JsonPropertyName("markPrice")] public decimal MarkPrice { get; set; } /// /// The current index price /// + [JsonPropertyName("indexPrice")] public decimal IndexPrice { get; set; } /// /// The last funding rate /// - [JsonProperty("lastFundingRate")] + [JsonPropertyName("lastFundingRate")] public decimal? FundingRate { get; set; } /// /// The time the funding rate is applied /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("nextFundingTime")] public DateTime NextFundingTime { get; set; } /// /// Estimated settle price /// + [JsonPropertyName("estimatedSettlePrice")] public decimal? EstimatedSettlePrice { get; set; } /// /// Interest rate /// + [JsonPropertyName("interestRate")] public decimal? InterestRate { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } } @@ -54,6 +60,7 @@ public record BinanceFuturesCoinMarkPrice: BinanceFuturesMarkPrice /// /// The pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesMultiAssetMode.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesMultiAssetMode.cs index 911c52f9d..596208902 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesMultiAssetMode.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesMultiAssetMode.cs @@ -8,7 +8,7 @@ public record BinanceFuturesMultiAssetMode /// /// Is multi assets mode enabled /// - [JsonProperty("multiAssetsMargin")] + [JsonPropertyName("multiAssetsMargin")] public bool MultiAssetMode { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderCancelResult.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderCancelResult.cs index 35f59bbbd..9f3d764a8 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderCancelResult.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderCancelResult.cs @@ -5,9 +5,10 @@ /// internal record BinanceFuturesMultipleOrderCancelResult : BinanceFuturesOrder { + [JsonPropertyName("code")] public int Code { get; set; } - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; } @@ -16,9 +17,10 @@ internal record BinanceFuturesMultipleOrderCancelResult : BinanceFuturesOrder /// internal record BinanceUsdFuturesMultipleOrderCancelResult : BinanceUsdFuturesOrder { + [JsonPropertyName("code")] public int Code { get; set; } - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderPlaceResult.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderPlaceResult.cs index 3f9ab60dc..bd60ec56b 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderPlaceResult.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesMultipleOrderPlaceResult.cs @@ -5,8 +5,9 @@ /// internal record BinanceFuturesMultipleOrderPlaceResult: BinanceFuturesOrder { + [JsonPropertyName("code")] public int Code { get; set; } - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; } @@ -15,8 +16,9 @@ internal record BinanceFuturesMultipleOrderPlaceResult: BinanceFuturesOrder /// internal record BinanceUsdFuturesMultipleOrderPlaceResult : BinanceUsdFuturesOrder { + [JsonPropertyName("code")] public int Code { get; set; } - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterest.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterest.cs index eda86ccb9..3022ad7b4 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterest.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterest.cs @@ -11,17 +11,19 @@ public record BinanceFuturesOpenInterest /// /// The symbol the information is about /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Open Interest info /// + [JsonPropertyName("openInterest")] public decimal OpenInterest { get; set; } /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime? Timestamp { get; set; } } @@ -33,11 +35,12 @@ public record BinanceFuturesCoinOpenInterest: BinanceFuturesOpenInterest /// /// The pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// /// The contract type /// - [JsonConverter(typeof(ContractTypeConverter))] + [JsonPropertyName("contractType")] public ContractType ContractType { get; set; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterestHistory.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterestHistory.cs index 202b29977..99c8fd867 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterestHistory.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesOpenInterestHistory.cs @@ -8,22 +8,25 @@ public record BinanceFuturesOpenInterestHistory /// /// The symbol the information is about /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Total open interest /// + [JsonPropertyName("sumOpenInterest")] public decimal SumOpenInterest { get; set; } /// /// Total open interest value /// + [JsonPropertyName("sumOpenInterestValue")] public decimal SumOpenInterestValue { get; set; } /// /// Timestamp /// - [JsonProperty("timestamp"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp"), JsonConverter(typeof(DateTimeConverter))] public DateTime? Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesOrder.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesOrder.cs index bb875a011..c7b4a2653 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesOrder.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesOrder.cs @@ -11,149 +11,149 @@ public record BinanceFuturesOrder /// /// The symbol the order is for /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Pair /// - [JsonProperty("pair")] + [JsonPropertyName("pair")] public string? Pair { get; set; } /// /// The order id as assigned by Binance /// - [JsonProperty("orderId")] + [JsonPropertyName("orderId")] public long Id { get; set; } /// /// The order id as assigned by the client /// - [JsonProperty("clientOrderId")] + [JsonPropertyName("clientOrderId")] public string ClientOrderId { get; set; } = string.Empty; /// /// The price of the order /// - [JsonProperty("price")] + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// The average price of the order /// - [JsonProperty("avgPrice")] + [JsonPropertyName("avgPrice")] public decimal AveragePrice { get; set; } /// /// Quantity that has been filled /// - [JsonProperty("executedQty")] + [JsonPropertyName("executedQty")] public decimal QuantityFilled { get; set; } /// /// Cumulative quantity /// - [JsonProperty("cumQty")] + [JsonPropertyName("cumQty")] public decimal? CummulativeQuantity { get; set; } /// /// Cumulative quantity in quote asset ( for USD futures ) /// - [JsonProperty("cumQuote")] + [JsonPropertyName("cumQuote")] public decimal? QuoteQuantityFilled { get; set; } /// /// Cumulative quantity in quote asset ( for Coin futures ) /// - [JsonProperty("cumBase")] + [JsonPropertyName("cumBase")] public decimal? BaseQuantityFilled { get; set; } /// /// The original quantity of the order /// - [JsonProperty("origQty")] + [JsonPropertyName("origQty")] public decimal Quantity { get; set; } /// /// Reduce Only /// - [JsonProperty("reduceOnly")] + [JsonPropertyName("reduceOnly")] public bool ReduceOnly { get; set; } /// /// If order is for closing a position /// - [JsonProperty("closePosition")] + [JsonPropertyName("closePosition")] public bool ClosePosition { get; set; } /// /// The side of the order /// - [JsonProperty("side"), JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("side")] public OrderSide Side { get; set; } /// /// The current status of the order /// - [JsonProperty("status"), JsonConverter(typeof(OrderStatusConverter))] + [JsonPropertyName("status")] public OrderStatus Status { get; set; } /// /// Stop price for the order /// - [JsonProperty("stopPrice")] + [JsonPropertyName("stopPrice")] public decimal? StopPrice { get; set; } /// /// For what time the order lasts /// - [JsonProperty("timeInForce"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("timeInForce"), JsonConverter(typeof(EnumConverter))] public TimeInForce TimeInForce { get; set; } /// /// The type of the order /// - [JsonProperty("type"), JsonConverter(typeof(FuturesOrderTypeConverter))] + [JsonPropertyName("type")] public FuturesOrderType Type { get; set; } /// /// The type of the order /// - [JsonProperty("origType"), JsonConverter(typeof(FuturesOrderTypeConverter))] + [JsonPropertyName("origType")] public FuturesOrderType OriginalType { get; set; } /// /// Activation price, only return with TRAILING_STOP_MARKET order /// - [JsonProperty("activatePrice")] + [JsonPropertyName("activatePrice")] public decimal? ActivatePrice { get; set; } /// /// Callback rate, only return with TRAILING_STOP_MARKET order /// - [JsonProperty("priceRate")] + [JsonPropertyName("priceRate")] public decimal? CallbackRate { get; set; } /// /// The time the order was updated /// - [JsonProperty("updateTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateTime { get; set; } /// /// The time the order was created /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime CreateTime { get; set; } /// /// The working type /// - [JsonProperty("workingType"), JsonConverter(typeof(WorkingTypeConverter))] + [JsonPropertyName("workingType")] public WorkingType WorkingType { get; set; } /// /// The position side of the order /// - [JsonProperty("positionSide"), JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("positionSide")] public PositionSide PositionSide { get; set; } /// /// Price protect /// - [JsonProperty("priceProtect")] + [JsonPropertyName("priceProtect")] public bool PriceProtect { get; set; } } @@ -165,19 +165,19 @@ public record BinanceUsdFuturesOrder : BinanceFuturesOrder /// /// /// - [JsonProperty("priceMatch"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("priceMatch"), JsonConverter(typeof(EnumConverter))] public PriceMatch PriceMatch { get; set; } /// /// Self trade prevention mode /// - [JsonProperty("selfTradePreventionMode"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("selfTradePreventionMode"), JsonConverter(typeof(EnumConverter))] public SelfTradePreventionMode SelfTradePreventionMode { get; set; } /// /// Auto cancel at this date /// - [JsonProperty("goodTillDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("goodTillDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime? GoodTillDate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderBook.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderBook.cs index 81f1ebe0e..914a7e7b0 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderBook.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderBook.cs @@ -10,22 +10,24 @@ public record BinanceFuturesOrderBook : BinanceOrderBook /// /// Pair /// + [JsonPropertyName("pair")] public string? Pair { get; set; } = string.Empty; /// /// The symbol of the order book /// + [JsonPropertyName("symbol")] public new string Symbol { get; set; } = string.Empty; /// /// The symbol of the order book /// - [JsonProperty("E"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("E"), JsonConverter(typeof(DateTimeConverter))] public DateTime MessageTime { get; set; } /// /// The ID of the last update /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TransactionTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderEditHistory.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderEditHistory.cs index 109c15ca7..2dbbc7fa8 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderEditHistory.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesOrderEditHistory.cs @@ -10,45 +10,45 @@ public record BinanceFuturesOrderEditHistory /// /// The symbol the order is for /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Pair /// - [JsonProperty("pair")] + [JsonPropertyName("pair")] public string? Pair { get; set; } /// /// The id of the amendment /// - [JsonProperty("amendmentId")] + [JsonPropertyName("amendmentId")] public long AmendmentId { get; set; } /// /// The order id as assigned by Binance /// - [JsonProperty("orderId")] + [JsonPropertyName("orderId")] public long Id { get; set; } /// /// The order id as assigned by the client /// - [JsonProperty("clientOrderId")] + [JsonPropertyName("clientOrderId")] public string? ClientOrderId { get; set; } /// /// Edit time /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Edit info /// - [JsonProperty("amendment")] + [JsonPropertyName("amendment")] public BinanceFuturesOrderChanges EditInfo { get; set; } = null!; /// /// Price match /// - [JsonProperty("priceMatch"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("priceMatch"), JsonConverter(typeof(EnumConverter))] public PriceMatch PriceMatch { get; set; } } @@ -61,18 +61,18 @@ public record BinanceFuturesOrderChanges /// /// Price change /// - [JsonProperty("price")] + [JsonPropertyName("price")] public BinanceFuturesOrderChange Price { get; set; } = null!; /// /// Quantity change /// - [JsonProperty("origQty")] + [JsonPropertyName("origQty")] public BinanceFuturesOrderChange Quantity { get; set; } = null!; /// /// Amount of times changed /// - [JsonProperty("count")] + [JsonPropertyName("count")] public int EditCount { get; set; } } @@ -84,12 +84,12 @@ public record BinanceFuturesOrderChange /// /// Before edit /// - [JsonProperty("before")] + [JsonPropertyName("before")] public decimal Before { get; set; } /// /// After edit /// - [JsonProperty("after")] + [JsonPropertyName("after")] public decimal After { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMarginResult.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMarginResult.cs index 873c72234..14034f74c 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMarginResult.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMarginResult.cs @@ -11,26 +11,29 @@ public record BinanceFuturesPositionMarginResult /// /// New margin amount /// + [JsonPropertyName("amount")] public decimal Amount { get; set; } /// /// Request response code /// + [JsonPropertyName("code")] public int Code { get; set; } /// /// Message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; /// /// Maximum margin value /// NOTE: string type, because the value van be 'inf' (infinite) /// + [JsonPropertyName("maxNotionalValue")] public string MaxNotionalValue { get; set; } = string.Empty; /// /// Direction of the requested margin change /// - [JsonConverter(typeof(FuturesMarginChangeDirectionTypeConverter))] + [JsonPropertyName("type")] public FuturesMarginChangeDirectionType Type { get; set; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMode.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMode.cs index 13568623f..bd8f8a8fb 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMode.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesPositionMode.cs @@ -11,7 +11,7 @@ public record BinanceFuturesPositionMode /// /// true": Hedge Mode mode; "false": One-way Mode /// - [JsonProperty("dualSidePosition"), JsonConverter(typeof(PositionModeConverter))] - public PositionMode PositionMode { get; set; } + [JsonPropertyName("dualSidePosition")] + public bool IsHedgeMode { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesQuantileEstimation.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesQuantileEstimation.cs index b1be7548c..0ab34f974 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesQuantileEstimation.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesQuantileEstimation.cs @@ -8,11 +8,13 @@ public record BinanceFuturesQuantileEstimation /// /// The symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Quantile /// - public BinanceFuturesAdlQuantile? AdlQuantile{ get; set; } + [JsonPropertyName("adlQuantile")] + public BinanceFuturesAdlQuantile? AdlQuantile { get; set; } } /// @@ -23,18 +25,22 @@ public record BinanceFuturesAdlQuantile /// /// Long position /// + [JsonPropertyName("LONG")] public int Long { get; set; } /// /// Short position /// + [JsonPropertyName("SHORT")] public int Short { get; set; } /// /// Hedge /// + [JsonPropertyName("HEDGE")] public int Hedge { get; set; } /// /// Hedge /// + [JsonPropertyName("BOTH")] public int Both { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbol.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbol.cs index 208bdeb07..50c492b54 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbol.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbol.cs @@ -1,5 +1,6 @@ using Binance.Net.Converters; using Binance.Net.Enums; +using Binance.Net.Objects.Models.Spot; namespace Binance.Net.Objects.Models.Futures { @@ -11,107 +12,114 @@ public record BinanceFuturesSymbol /// /// Filters for order on this symbol /// - public IEnumerable Filters { get; set; } = Array.Empty(); + [JsonPropertyName("filters")] + public IEnumerable Filters { get; set; } = Array.Empty(); /// /// Contract type /// - [JsonConverter(typeof(ContractTypeConverter))] + [JsonPropertyName("contractType")] public ContractType? ContractType { get; set; } /// /// The maintenance margin percent /// + [JsonPropertyName("maintMarginPercent")] public decimal MaintMarginPercent { get; set; } /// /// The price Precision /// + [JsonPropertyName("pricePrecision")] public int PricePrecision { get; set; } /// /// The quantity precision /// + [JsonPropertyName("quantityPrecision")] public int QuantityPrecision { get; set; } /// - /// The required margin percent + /// The required margin percentage /// + [JsonPropertyName("requiredMarginPercent")] public decimal RequiredMarginPercent { get; set; } /// /// The base asset /// + [JsonPropertyName("baseAsset")] public string BaseAsset { get; set; } = string.Empty; /// /// Margin asset /// + [JsonPropertyName("marginAsset")] public string MarginAsset { get; set; } = string.Empty; /// /// The quote asset /// + [JsonPropertyName("quoteAsset")] public string QuoteAsset { get; set; } = string.Empty; /// /// The precision of the base asset /// + [JsonPropertyName("baseAssetPrecision")] public int BaseAssetPrecision { get; set; } /// /// The precision of the quote asset /// - [JsonProperty("quotePrecision")] + [JsonPropertyName("quotePrecision")] public int QuoteAssetPrecision { get; set; } /// /// Allowed order types /// - [JsonProperty(ItemConverterType = typeof(FuturesOrderTypeConverter))] + [JsonPropertyName("orderTypes")] public IEnumerable OrderTypes { get; set; } = Array.Empty(); /// /// The symbol /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string Name { get; set; } = string.Empty; /// /// Pair /// - [JsonProperty("pair")] + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// /// Delivery Date /// - [JsonProperty("deliveryDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("deliveryDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime DeliveryDate { get; set; } /// /// Delivery Date /// - [JsonProperty("onboardDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("onboardDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime ListingDate { get; set; } /// /// Trigger protect /// + [JsonPropertyName("triggerProtect")] public decimal TriggerProtect { get; set; } /// /// Currently Empty /// - [JsonProperty("underlyingType"), JsonConverter(typeof(UnderlyingTypeConverter))] + [JsonPropertyName("underlyingType")] public UnderlyingType UnderlyingType { get; set; } /// /// Sub types /// + [JsonPropertyName("underlyingSubType")] public IEnumerable UnderlyingSubType { get; set; } = Array.Empty(); /// /// Liquidation fee /// + [JsonPropertyName("liquidationFee")] public decimal LiquidationFee { get; set; } /// /// The max price difference rate (from mark price) a market order can make /// + [JsonPropertyName("marketTakeBound")] public decimal MarketTakeBound { get; set; } - /// - /// Currently Empty - /// - [JsonIgnore] - public object[] UnderlyingSupType { get; set; } = Array.Empty(); - /// /// Allowed order time in force /// - [JsonProperty(ItemConverterType = typeof(EnumConverter))] + [JsonPropertyName("timeInForce")] public IEnumerable TimeInForce { get; set; } = Array.Empty(); /// /// Filter for the max accuracy of the price for this symbol @@ -163,13 +171,13 @@ public record BinanceFuturesUsdtSymbol: BinanceFuturesSymbol /// /// The status of the symbol /// - [JsonConverter(typeof(SymbolStatusConverter))] + [JsonPropertyName("status")] public SymbolStatus Status { get; set; } /// /// The status of the symbol /// - [JsonProperty("settlePlan")] + [JsonPropertyName("settlePlan")] public decimal SettlePlan { get; set; } } @@ -182,19 +190,19 @@ public record BinanceFuturesCoinSymbol: BinanceFuturesSymbol /// /// The status of the symbol /// - [JsonConverter(typeof(SymbolStatusConverter))] - [JsonProperty("contractStatus")] + [JsonPropertyName("contractStatus")] public SymbolStatus Status { get; set; } /// /// Contract size /// + [JsonPropertyName("contractSize")] public int ContractSize { get; set; } /// /// Equal quantity precision /// - [JsonProperty("equalQtyPrecision")] + [JsonPropertyName("equalQtyPrecision")] public int EqualQuantityPrecision { get; set; } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolBracket.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolBracket.cs index f498485a7..d2c980d76 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolBracket.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolBracket.cs @@ -8,15 +8,15 @@ public record BinanceFuturesSymbolBracket /// /// Symbol or pair /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// //user symbol bracket multiplier, only appears when user's symbol bracket is adjusted /// - [JsonProperty("notionalCoef")] + [JsonPropertyName("notionalCoef")] public decimal? NotionalCoef { get; set; } - [JsonProperty("pair")] + [JsonPropertyName("pair")] private string Pair { set => Symbol = value; @@ -25,6 +25,7 @@ private string Pair /// /// Brackets /// + [JsonPropertyName("brackets")] public IEnumerable Brackets { get; set; } = Array.Empty(); } @@ -37,19 +38,21 @@ public record BinanceFuturesBracket /// /// Bracket /// + [JsonPropertyName("bracket")] public int Bracket { get; set; } /// /// Max initial leverage for this bracket /// + [JsonPropertyName("initialLeverage")] public int InitialLeverage { get; set; } /// /// Cap of this bracket /// - [JsonProperty("notionalCap")] + [JsonPropertyName("notionalCap")] public long Cap { get; set; } - [JsonProperty("qtyCap")] + [JsonPropertyName("qtyCap")] private long QuantityCap { set => Cap = value; @@ -58,9 +61,9 @@ private long QuantityCap /// /// Floor of this bracket /// - [JsonProperty("notionalFloor")] + [JsonPropertyName("notionalFloor")] public long Floor { get; set; } - [JsonProperty("qtylFloor")] + [JsonPropertyName("qtylFloor")] private long QuantityFloor { set => Floor = value; @@ -69,13 +72,13 @@ private long QuantityFloor /// /// Maintenance ratio for this bracket /// - [JsonProperty("maintMarginRatio")] + [JsonPropertyName("maintMarginRatio")] public decimal MaintenanceMarginRatio { get; set; } /// /// Auxiliary number for quick calculation /// - [JsonProperty("cum")] + [JsonPropertyName("cum")] public decimal MaintAmount { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolFilter.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolFilter.cs deleted file mode 100644 index 91c8a00b8..000000000 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesSymbolFilter.cs +++ /dev/null @@ -1,126 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Futures -{ - /// - /// A filter for order placed on a symbol. Can be either a , , - /// - [JsonConverter(typeof(SymbolFuturesFilterConverter))] - public record BinanceFuturesSymbolFilter - { - /// - /// The type of this filter - /// - public SymbolFilterType FilterType { get; set; } - } - - /// - /// Price filter - /// - public record BinanceSymbolPriceFilter : BinanceFuturesSymbolFilter - { - /// - /// The minimal price the order can be for - /// - public decimal MinPrice { get; set; } - /// - /// The max price the order can be for - /// - public decimal MaxPrice { get; set; } - /// - /// The tick size of the price. The price can not have more precision as this and can only be incremented in steps of this. - /// - public decimal TickSize { get; set; } - } - - /// - /// Lot size filter - /// - public record BinanceSymbolLotSizeFilter : BinanceFuturesSymbolFilter - { - /// - /// The minimal quantity of an order - /// - public decimal MinQuantity { get; set; } - /// - /// The maximum quantity of an order - /// - public decimal MaxQuantity { get; set; } - /// - /// The tick size of the quantity. The quantity can not have more precision as this and can only be incremented in steps of this. - /// - public decimal StepSize { get; set; } - } - - /// - /// Market lot size filter - /// - public record BinanceSymbolMarketLotSizeFilter : BinanceFuturesSymbolFilter - { - /// - /// The minimal quantity of an order - /// - public decimal MinQuantity { get; set; } - /// - /// The maximum quantity of an order - /// - public decimal MaxQuantity { get; set; } - /// - /// The tick size of the quantity. The quantity can not have more precision as this and can only be incremented in steps of this. - /// - public decimal StepSize { get; set; } - } - - /// - ///Max orders filter - /// - public record BinanceSymbolMaxOrdersFilter : BinanceFuturesSymbolFilter - { - /// - /// The max number of orders for this symbol - /// - public int MaxNumberOrders { get; set; } - } - - /// - /// Max algo orders filter - /// - public record BinanceSymbolMaxAlgorithmicOrdersFilter : BinanceFuturesSymbolFilter - { - /// - /// The max number of Algorithmic orders for this symbol - /// - public int MaxNumberAlgorithmicOrders { get; set; } - } - - /// - /// Price percentage filter - /// - public record BinanceSymbolPercentPriceFilter : BinanceFuturesSymbolFilter - { - /// - /// The max factor the price can deviate up - /// - public decimal MultiplierUp { get; set; } - /// - /// The max factor the price can deviate down - /// - public decimal MultiplierDown { get; set; } - /// - /// The amount of minutes the average price of trades is calculated over. 0 means the last price is used - /// - public int MultiplierDecimal { get; set; } - } - - /// - /// Min notional filter - /// - public record BinanceSymbolMinNotionalFilter : BinanceFuturesSymbolFilter - { - /// - /// The minimal total quote quantity of an order. This is calculated by Price * Quantity. - /// - public decimal MinNotional { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesTrade.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesTrade.cs index 52782cdbc..eba1fc841 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesTrade.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesTrade.cs @@ -11,62 +11,69 @@ public record BinanceFuturesTrade /// /// The symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Is buyer /// + [JsonPropertyName("buyer")] public bool Buyer { get; set; } /// /// Paid fee /// - [JsonProperty("commission")] + [JsonPropertyName("commission")] public decimal Fee { get; set; } /// /// Asset the fee is paid in /// - [JsonProperty("commissionAsset")] + [JsonPropertyName("commissionAsset")] public string FeeAsset { get; set; } = string.Empty; /// /// Trade id /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// Is maker /// + [JsonPropertyName("maker")] public bool Maker { get; set; } /// /// Order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// Price /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// Quantity /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// Realized pnl /// + [JsonPropertyName("realizedPnl")] public decimal RealizedPnl { get; set; } /// /// Order side /// - [JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("side")] public OrderSide Side { get; set; } /// /// Position side /// - [JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("positionSide")] public PositionSide PositionSide { get; set; } /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } @@ -78,7 +85,7 @@ public record BinanceFuturesUsdtTrade: BinanceFuturesTrade /// /// Quote quantity /// - [JsonProperty("quoteQty")] + [JsonPropertyName("quoteQty")] public decimal QuoteQuantity { get; set; } } @@ -90,17 +97,19 @@ public record BinanceFuturesCoinTrade : BinanceFuturesTrade /// /// The pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// /// The margin asset /// + [JsonPropertyName("marginAsset")] public string MarginAsset { get; set; } = string.Empty; /// /// Base quantity /// - [JsonProperty("baseQty")] + [JsonPropertyName("baseQty")] public decimal BaseQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesTradingStatus.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesTradingStatus.cs index 460b8d96c..3abb9c1bc 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesTradingStatus.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesTradingStatus.cs @@ -8,11 +8,13 @@ public record BinanceFuturesTradingStatus /// /// The trading rule indicators /// + [JsonPropertyName("indicators")] public Dictionary> Indicators { get; set; } = new Dictionary>(); /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } @@ -24,23 +26,28 @@ public record BinanceFuturesTradingStatusIndicator /// /// Locked /// + [JsonPropertyName("isLocked")] public bool IsLocked { get; set; } /// /// Planned time when indicator is unlocked /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("plannedRecoveryTime")] public DateTime? PlannedRecoveryTime { get; set; } /// /// The indicator name /// + [JsonPropertyName("indicator")] public string Indicator { get; set; } = string.Empty; /// /// Current value of the indicator /// + [JsonPropertyName("value")] public decimal Value { get; set; } /// /// The trigger value of the indicator /// + [JsonPropertyName("triggerValue")] public decimal TriggerValue { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinanceFuturesUsdtAsset.cs b/Binance.Net/Objects/Models/Futures/BinanceFuturesUsdtAsset.cs index 22cb9c09c..e9d455bb7 100644 --- a/Binance.Net/Objects/Models/Futures/BinanceFuturesUsdtAsset.cs +++ b/Binance.Net/Objects/Models/Futures/BinanceFuturesUsdtAsset.cs @@ -8,14 +8,17 @@ public record BinanceFuturesUsdtAsset /// /// Name of the asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Whether the asset can be used as margin in Multi-Assets mode /// + [JsonPropertyName("marginAvailable")] public bool MarginAvailable { get; set; } /// /// Auto-exchange threshold in Multi-Assets margin mode /// + [JsonPropertyName("autoAssetExchange")] public decimal? AutoAssetExchange { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinancePosition.cs b/Binance.Net/Objects/Models/Futures/BinancePosition.cs index e5286f517..9c05f240a 100644 --- a/Binance.Net/Objects/Models/Futures/BinancePosition.cs +++ b/Binance.Net/Objects/Models/Futures/BinancePosition.cs @@ -11,26 +11,29 @@ public record BinancePositionBase /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Entry price /// + [JsonPropertyName("entryPrice")] public decimal EntryPrice { get; set; } /// /// Leverage /// + [JsonPropertyName("leverage")] public int Leverage { get; set; } /// /// Unrealized profit /// - [JsonProperty("unrealizedProfit")] + [JsonPropertyName("unrealizedProfit")] public decimal UnrealizedPnl { get; set; } /// /// Position side /// - [JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("positionSide")] public PositionSide PositionSide { get; set; } } @@ -42,38 +45,44 @@ public record BinancePositionInfoBase: BinancePositionBase /// /// Initial margin /// + [JsonPropertyName("initialMargin")] public decimal InitialMargin { get; set; } /// /// Maint margin /// + [JsonPropertyName("mainMargin")] public decimal MaintMargin { get; set; } /// /// Position initial margin /// + [JsonPropertyName("positionInitialMargin")] public decimal PositionInitialMargin { get; set; } - + /// /// Open order initial margin /// + [JsonPropertyName("openOrderInitialMargin")] public decimal OpenOrderInitialMargin { get; set; } /// /// Isolated /// + [JsonPropertyName("isolated")] public bool Isolated { get; set; } /// /// Position quantity /// - [JsonProperty("positionAmt")] + [JsonPropertyName("positionAmt")] public decimal Quantity { get; set; } /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime? UpdateTime { get; set; } } @@ -85,6 +94,7 @@ public record BinancePositionInfoUsdt : BinancePositionInfoBase /// /// Max notional /// + [JsonPropertyName("maxNotional")] public decimal MaxNotional { get; set; } } @@ -97,12 +107,12 @@ public record BinancePositionInfoCoin : BinancePositionInfoBase /// /// Break even price /// - [JsonProperty("breakEvenPrice")] + [JsonPropertyName("breakEvenPrice")] public decimal BreakEvenPrice { get; set; } /// /// Max quantity /// - [JsonProperty("maxQty")] + [JsonPropertyName("maxQty")] public decimal MaxQuantity { get; set; } } @@ -114,45 +124,50 @@ public record BinancePositionDetailsBase: BinancePositionBase /// /// Margin type /// - [JsonConverter(typeof(FuturesMarginTypeConverter))] + [JsonPropertyName("marginType")] public FuturesMarginType MarginType { get; set; } /// /// Is auto add margin /// + [JsonPropertyName("isAutoAddMargin")] public bool IsAutoAddMargin { get; set; } /// /// Isolated margin /// + [JsonPropertyName("isolatedMargin")] public decimal IsolatedMargin { get; set; } /// /// Liquidation price /// + [JsonPropertyName("liquidationPrice")] public decimal LiquidationPrice { get; set; } /// /// Mark price /// + [JsonPropertyName("markPrice")] public decimal MarkPrice { get; set; } /// /// Position quantity /// - [JsonProperty("positionAmt")] + [JsonPropertyName("positionAmt")] public decimal Quantity { get; set; } /// /// Break even price /// - [JsonProperty("breakEvenPrice")] + [JsonPropertyName("breakEvenPrice")] public decimal BreakEvenPrice { get; set; } /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } @@ -164,17 +179,17 @@ public record BinancePositionDetailsUsdt : BinancePositionDetailsBase /// /// Max notional /// - [JsonProperty("maxNotionalValue")] + [JsonPropertyName("maxNotionalValue")] public decimal MaxNotional { get; set; } /// /// Notional value /// - [JsonProperty("notional")] + [JsonPropertyName("notional")] public decimal Notional { get; set; } /// /// Isolated wallet /// - [JsonProperty("isolatedWallet")] + [JsonPropertyName("isolatedWallet")] public decimal IsolatedWallet { get; set; } } @@ -186,12 +201,12 @@ public record BinancePositionDetailsCoin : BinancePositionDetailsBase /// /// Notional value /// - [JsonProperty("notionalValue")] + [JsonPropertyName("notionalValue")] public decimal NotionalValue { get; set; } /// /// Max quantity /// - [JsonProperty("maxQty")] + [JsonPropertyName("maxQty")] public decimal MaxQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/BinancePositionV3.cs b/Binance.Net/Objects/Models/Futures/BinancePositionV3.cs new file mode 100644 index 000000000..00640a3d6 --- /dev/null +++ b/Binance.Net/Objects/Models/Futures/BinancePositionV3.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Binance.Net.Enums; + +namespace Binance.Net.Objects.Models.Futures +{ + /// + /// Position information + /// + public record BinancePositionV3 + { + /// + /// Symbol + /// + [JsonPropertyName("symbol")] + public string Symbol { get; set; } = string.Empty; + /// + /// Position side + /// + [JsonPropertyName("positionSide")] + public PositionSide PositionSide { get; set; } + /// + /// Position amount + /// + [JsonPropertyName("positionAmt")] + public decimal PositionAmt { get; set; } + /// + /// Entry price + /// + [JsonPropertyName("entryPrice")] + public decimal EntryPrice { get; set; } + /// + /// Break even price + /// + [JsonPropertyName("breakEvenPrice")] + public decimal BreakEvenPrice { get; set; } + /// + /// Mark price + /// + [JsonPropertyName("markPrice")] + public decimal MarkPrice { get; set; } + /// + /// Unrealized profit + /// + [JsonPropertyName("unRealizedProfit")] + public decimal UnrealizedProfit { get; set; } + /// + /// Liquidation price + /// + [JsonPropertyName("liquidationPrice")] + public decimal LiquidationPrice { get; set; } + /// + /// Isolated margin + /// + [JsonPropertyName("isolatedMargin")] + public decimal IsolatedMargin { get; set; } + /// + /// Notional + /// + [JsonPropertyName("notional")] + public decimal Notional { get; set; } + /// + /// Margin asset + /// + [JsonPropertyName("marginAsset")] + public string MarginAsset { get; set; } = string.Empty; + /// + /// Isolated wallet + /// + [JsonPropertyName("isolatedWallet")] + public decimal IsolatedWallet { get; set; } + /// + /// Initial margin + /// + [JsonPropertyName("initialMargin")] + public decimal InitialMargin { get; set; } + /// + /// Maintenance margin + /// + [JsonPropertyName("maintMargin")] + public decimal MaintenanceMargin { get; set; } + /// + /// Position initial margin + /// + [JsonPropertyName("positionInitialMargin")] + public decimal PositionInitialMargin { get; set; } + /// + /// Open order initial margin + /// + [JsonPropertyName("openOrderInitialMargin")] + public decimal OpenOrderInitialMargin { get; set; } + /// + /// Auto deleverage + /// + [JsonPropertyName("adl")] + public decimal Adl { get; set; } + /// + /// Bid notional + /// + [JsonPropertyName("bidNotional")] + public decimal BidNotional { get; set; } + /// + /// Ask notional + /// + [JsonPropertyName("askNotional")] + public decimal AskNotional { get; set; } + /// + /// Update time + /// + [JsonPropertyName("updateTime")] + public DateTime? UpdateTime { get; set; } + } +} diff --git a/Binance.Net/Objects/Models/Futures/BinanceSymbolConfiguration.cs b/Binance.Net/Objects/Models/Futures/BinanceSymbolConfiguration.cs new file mode 100644 index 000000000..0cbfe5ce9 --- /dev/null +++ b/Binance.Net/Objects/Models/Futures/BinanceSymbolConfiguration.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Binance.Net.Enums; + +namespace Binance.Net.Objects.Models.Futures +{ + /// + /// Symbol configuration + /// + public record BinanceSymbolConfiguration + { + /// + /// Symbol + /// + [JsonPropertyName("symbol")] + public string Symbol { get; set; } = string.Empty; + /// + /// Margin type + /// + [JsonPropertyName("marginType")] + public FuturesMarginType? MarginType { get; set; } + /// + /// Is auto add margin + /// + [JsonPropertyName("isAutoAddMargin")] + public bool IsAutoAddMargin { get; set; } + /// + /// Leverage + /// + [JsonPropertyName("leverage")] + public decimal Leverage { get; set; } + /// + /// Max notional value + /// + [JsonPropertyName("maxNotionalValue")] + public decimal MaxNotionalValue { get; set; } + } + + +} diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceConditionOrderTriggerRejectUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceConditionOrderTriggerRejectUpdate.cs index d8007bc57..417fa5b3e 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceConditionOrderTriggerRejectUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceConditionOrderTriggerRejectUpdate.cs @@ -10,13 +10,13 @@ public record BinanceConditionOrderTriggerRejectUpdate : BinanceStreamEvent /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("T")] + [JsonPropertyName("T")] public DateTime Timestamp { get; set; } /// /// Reject info /// - [JsonProperty("or")] + [JsonPropertyName("or")] public BinanceConditionOrderTriggerReject RejectInfo { get; set; } = null!; } @@ -28,17 +28,17 @@ public record BinanceConditionOrderTriggerReject /// /// The symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Order id /// - [JsonProperty("i")] + [JsonPropertyName("i")] public long OrderId { get; set; } /// /// Reject reason /// - [JsonProperty("r")] + [JsonPropertyName("r")] public string Reason { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAccountInfo.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAccountInfo.cs index ccfb1512d..c25c8b301 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAccountInfo.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAccountInfo.cs @@ -11,12 +11,12 @@ public record BinanceFuturesStreamAccountUpdate: BinanceStreamEvent /// /// The update data /// - [JsonProperty("a")] + [JsonPropertyName("a")] public BinanceFuturesStreamAccountUpdateData UpdateData { get; set; } = new BinanceFuturesStreamAccountUpdateData(); /// /// Transaction time /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TransactionTime { get; set; } /// @@ -33,19 +33,19 @@ public record BinanceFuturesStreamAccountUpdateData /// /// Account update reason type /// - [JsonProperty("m"), JsonConverter(typeof(AccountUpdateReasonConverter))] + [JsonPropertyName("m"), JsonConverter(typeof(EnumConverter))] public AccountUpdateReason Reason { get; set; } /// /// Balances /// - [JsonProperty("B")] + [JsonPropertyName("B")] public IEnumerable Balances { get; set; } = Array.Empty(); /// /// Positions /// - [JsonProperty("P")] + [JsonPropertyName("P")] public IEnumerable Positions { get; set; } = Array.Empty(); } @@ -57,22 +57,22 @@ public record BinanceFuturesStreamBalance /// /// The asset this balance is for /// - [JsonProperty("a")] + [JsonPropertyName("a")] public string Asset { get; set; } = string.Empty; /// /// The quantity that isn't locked in a trade /// - [JsonProperty("wb")] + [JsonPropertyName("wb")] public decimal WalletBalance { get; set; } /// /// The quantity that is locked in a trade /// - [JsonProperty("cw")] + [JsonPropertyName("cw")] public decimal CrossWalletBalance { get; set; } /// /// The balance change except PnL and commission /// - [JsonProperty("bc")] + [JsonPropertyName("bc")] public decimal BalanceChange { get; set; } } @@ -84,50 +84,50 @@ public record BinanceFuturesStreamPosition /// /// The symbol this balance is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The quantity of the position /// - [JsonProperty("pa")] + [JsonPropertyName("pa")] public decimal Quantity { get; set; } /// /// The entry price /// - [JsonProperty("ep")] + [JsonPropertyName("ep")] public decimal EntryPrice { get; set; } /// /// The break even price /// - [JsonProperty("bep")] + [JsonPropertyName("bep")] public decimal BreakEvenPrice { get; set; } /// /// The accumulated realized PnL /// - [JsonProperty("cr")] + [JsonPropertyName("cr")] public decimal RealizedPnl { get; set; } /// /// The Unrealized PnL /// - [JsonProperty("up")] + [JsonPropertyName("up")] public decimal UnrealizedPnl { get; set; } /// /// The margin type /// - [JsonProperty("mt"), JsonConverter(typeof(FuturesMarginTypeConverter))] + [JsonPropertyName("mt")] public FuturesMarginType MarginType { get; set; } /// /// The isolated wallet (if isolated position) /// - [JsonProperty("iw")] + [JsonPropertyName("iw")] public decimal IsolatedMargin { get; set; } /// /// Position Side /// - [JsonProperty("ps"), JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("ps")] public PositionSide PositionSide { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAssetIndexUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAssetIndexUpdate.cs index 4f37c709c..6be414944 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAssetIndexUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamAssetIndexUpdate.cs @@ -8,52 +8,52 @@ public record BinanceFuturesStreamAssetIndexUpdate : BinanceStreamEvent /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Index price /// - [JsonProperty("i")] + [JsonPropertyName("i")] public decimal IndexPrice { get; set; } /// /// Bid buffer /// - [JsonProperty("b")] + [JsonPropertyName("b")] public decimal BidBuffer { get; set; } /// /// Ask buffer /// - [JsonProperty("a")] + [JsonPropertyName("a")] public decimal AskBuffer { get; set; } /// /// Bid rate /// - [JsonProperty("B")] + [JsonPropertyName("B")] public decimal BidRate { get; set; } /// /// Ask rate /// - [JsonProperty("A")] + [JsonPropertyName("A")] public decimal AskRate { get; set; } /// /// Auto exchange bid buffer /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal AutoExchangeBidBuffer { get; set; } /// /// Auto exchange ask buffer /// - [JsonProperty("g")] + [JsonPropertyName("g")] public decimal AutoExchangeAskBuffer { get; set; } /// /// Auto exchange bid rate /// - [JsonProperty("Q")] + [JsonPropertyName("Q")] public decimal AutoExchangeBidRate { get; set; } /// /// Auto exchange ask rate /// - [JsonProperty("G")] + [JsonPropertyName("G")] public decimal AutoExchangeAskRate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamBookPrice.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamBookPrice.cs index 9960ffe49..0e0c7079a 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamBookPrice.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamBookPrice.cs @@ -10,18 +10,18 @@ public record BinanceFuturesStreamBookPrice : BinanceStreamBookPrice /// /// Timestamp /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime? TransactionTime { get; set; } /// /// The time the event happened /// - [JsonProperty("E"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("E"), JsonConverter(typeof(DateTimeConverter))] public DateTime EventTime { get; set; } /// /// The type of the event /// - [JsonProperty("e")] + [JsonPropertyName("e")] public string Event { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCoinKline.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCoinKline.cs index 20d32482e..2fd8cca1e 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCoinKline.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCoinKline.cs @@ -13,14 +13,14 @@ public record BinanceFuturesStreamCoinKlineData : BinanceStreamEvent, IBinanceSt /// /// The symbol the data is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The data /// - [JsonProperty("k")] - [JsonConverter(typeof(InterfaceConverter))] + [JsonPropertyName("k")] + [JsonConverter(typeof(InterfaceConverter))] public IBinanceStreamKline Data { get; set; } = default!; } @@ -32,80 +32,80 @@ public record BinanceFuturesStreamCoinKline : BinanceKlineBase, IBinanceStreamKl /// /// The open time of this candlestick /// - [JsonProperty("t"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("t"), JsonConverter(typeof(DateTimeConverter))] public new DateTime OpenTime { get; set; } /// - [JsonProperty("q")] + [JsonPropertyName("q")] public override decimal Volume { get; set; } /// /// The close time of this candlestick /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public new DateTime CloseTime { get; set; } /// - [JsonProperty("v")] + [JsonPropertyName("v")] public override decimal QuoteVolume { get; set; } /// /// The symbol this candlestick is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The interval of this candlestick /// - [JsonProperty("i"), JsonConverter(typeof(KlineIntervalConverter))] + [JsonPropertyName("i")] public KlineInterval Interval { get; set; } /// /// The first trade id in this candlestick /// - [JsonProperty("f")] + [JsonPropertyName("f")] public long FirstTrade { get; set; } /// /// The last trade id in this candlestick /// - [JsonProperty("L")] + [JsonPropertyName("L")] public long LastTrade { get; set; } /// /// The open price of this candlestick /// - [JsonProperty("o")] + [JsonPropertyName("o")] public new decimal OpenPrice { get; set; } /// /// The close price of this candlestick /// - [JsonProperty("c")] + [JsonPropertyName("c")] public new decimal ClosePrice { get; set; } /// /// The highest price of this candlestick /// - [JsonProperty("h")] + [JsonPropertyName("h")] public new decimal HighPrice { get; set; } /// /// The lowest price of this candlestick /// - [JsonProperty("l")] + [JsonPropertyName("l")] public new decimal LowPrice { get; set; } /// /// The amount of trades in this candlestick /// - [JsonProperty("n")] + [JsonPropertyName("n")] public new int TradeCount { get; set; } /// - [JsonProperty("Q")] + [JsonPropertyName("Q")] public override decimal TakerBuyBaseVolume { get; set; } /// - [JsonProperty("V")] + [JsonPropertyName("V")] public override decimal TakerBuyQuoteVolume { get; set; } /// /// Boolean indicating whether this candlestick is closed /// - [JsonProperty("x")] + [JsonPropertyName("x")] public bool Final { get; set; } /// diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCompositeIndex.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCompositeIndex.cs index e052bf462..1eed8a54b 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCompositeIndex.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamCompositeIndex.cs @@ -8,24 +8,24 @@ public record BinanceFuturesStreamCompositeIndex : BinanceStreamEvent /// /// The symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The price /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal Price { get; set; } /// /// Base asset /// - [JsonProperty("C")] + [JsonPropertyName("C")] public string BaseAsset { get; set; } = string.Empty; /// /// Composition /// - [JsonProperty("c")] + [JsonPropertyName("c")] public IEnumerable Composition { get; set; } = Array.Empty(); } @@ -37,27 +37,27 @@ public record BinanceFuturesStreamCompositeIndexAsset /// /// Base asset name /// - [JsonProperty("b")] + [JsonPropertyName("b")] public string Asset { get; set; } = string.Empty; /// /// Quote asset name /// - [JsonProperty("q")] + [JsonPropertyName("q")] public string QuoteAsset { get; set; } = string.Empty; /// /// Weight in quantity /// - [JsonProperty("w")] + [JsonPropertyName("w")] public decimal WeightInQuantity { get; set; } /// /// Weight in percentage /// - [JsonProperty("W")] + [JsonPropertyName("W")] public decimal WeightInPercentage { get; set; } /// /// Index price /// - [JsonProperty("i")] + [JsonPropertyName("i")] public decimal IndexPrice { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamConfigUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamConfigUpdate.cs index 5c587a392..c0b97ae08 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamConfigUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamConfigUpdate.cs @@ -8,19 +8,19 @@ public record BinanceFuturesStreamConfigUpdate : BinanceStreamEvent /// /// Leverage Update data /// - [JsonProperty("ac")] + [JsonPropertyName("ac")] public BinanceFuturesStreamLeverageUpdateData? LeverageUpdateData { get; set; } /// /// Position mode Update data /// - [JsonProperty("ai")] + [JsonPropertyName("ai")] public BinanceFuturesStreamConfigUpdateData? ConfigUpdateData { get; set; } /// /// Transaction time /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TransactionTime { get; set; } /// /// The listen key the update was for @@ -36,13 +36,13 @@ public record BinanceFuturesStreamLeverageUpdateData /// /// The symbol this balance is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string? Symbol { get; set; } /// /// The symbol this leverage is for /// - [JsonProperty("l")] + [JsonPropertyName("l")] public int Leverage { get; set; } } @@ -54,7 +54,7 @@ public record BinanceFuturesStreamConfigUpdateData /// /// Multi-Assets Mode /// - [JsonProperty("j")] + [JsonPropertyName("j")] public bool MultiAssetMode { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamContinuousKline.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamContinuousKline.cs index f64b602a6..d6a8b8707 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamContinuousKline.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamContinuousKline.cs @@ -13,20 +13,20 @@ public record BinanceStreamContinuousKlineData: BinanceStreamEvent, IBinanceStre /// /// The symbol the data is for /// - [JsonProperty("ps")] + [JsonPropertyName("ps")] public string Symbol { get; set; } = string.Empty; /// /// The contract type /// - [JsonProperty("ct")] + [JsonPropertyName("ct")] public ContractType ContractType { get; set; } = ContractType.Unknown; /// /// The data /// - [JsonProperty("k")] - [JsonConverter(typeof(InterfaceConverter))] + [JsonPropertyName("k")] + [JsonConverter(typeof(InterfaceConverter))] public IBinanceStreamKline Data { get; set; } = default!; } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexKline.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexKline.cs index 55bbd1b66..2377d9907 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexKline.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexKline.cs @@ -11,13 +11,13 @@ public record BinanceStreamIndexKlineData : BinanceStreamEvent /// /// The symbol the data is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The data /// - [JsonProperty("k")] + [JsonPropertyName("k")] public BinanceFuturesStreamIndexKline Data { get; set; } = default!; } @@ -30,96 +30,95 @@ public record BinanceFuturesStreamIndexKline /// Open time /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("t")] + [JsonPropertyName("t")] public DateTime OpenTime { get; set; } /// /// Close time /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("T")] + [JsonPropertyName("T")] public DateTime CloseTime { get; set; } /// /// Ignore /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Ignore1 { get; set; } = string.Empty; /// /// Kline interval /// - [JsonProperty("i")] - [JsonConverter(typeof(KlineIntervalConverter))] + [JsonPropertyName("i")] public KlineInterval Interval { get; set; } /// /// Ignore /// - [JsonProperty("f")] + [JsonPropertyName("f")] public string Ignore2 { get; set; } = string.Empty; /// /// Ignore /// - [JsonProperty("L")] + [JsonPropertyName("L")] public string Ignore3 { get; set; } = string.Empty; /// /// Open price of the kline /// - [JsonProperty("o")] + [JsonPropertyName("o")] public decimal OpenPrice { get; set; } /// /// Close price of the kline /// - [JsonProperty("c")] + [JsonPropertyName("c")] public decimal ClosePrice { get; set; } /// /// High price of the kline /// - [JsonProperty("h")] + [JsonPropertyName("h")] public decimal HighPrice { get; set; } /// /// Low price of the kline /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal LowPrice { get; set; } /// /// Ignore /// - [JsonProperty("v")] + [JsonPropertyName("v")] public string Ignore4 { get; set; } = string.Empty; /// /// Number of basic data /// - [JsonProperty("n")] + [JsonPropertyName("n")] public int NumberOfBasicData { get; set; } /// /// Is the kline closed /// - [JsonProperty("x")] + [JsonPropertyName("x")] public bool Closed { get; set; } /// /// Ignore /// - [JsonProperty("q")] + [JsonPropertyName("q")] public string Ignore5 { get; set; } = string.Empty; /// /// Ignore /// - [JsonProperty("V")] + [JsonPropertyName("V")] public string Ignore6 { get; set; } = string.Empty; /// /// Ignore /// - [JsonProperty("Q")] + [JsonPropertyName("Q")] public string Ignore7 { get; set; } = string.Empty; /// /// Ignore /// - [JsonProperty("b")] + [JsonPropertyName("b")] public string Ignore8 { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexPrice.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexPrice.cs index eccf526cb..0ba3d6f9e 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexPrice.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamIndexPrice.cs @@ -8,12 +8,12 @@ public record BinanceFuturesStreamIndexPrice: BinanceStreamEvent /// /// The pair /// - [JsonProperty("i")] + [JsonPropertyName("i")] public string Pair { get; set; } = string.Empty; /// /// The index price /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal IndexPrice { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamLiquidation.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamLiquidation.cs index db80e4e89..7d81aea18 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamLiquidation.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamLiquidation.cs @@ -12,7 +12,7 @@ public record BinanceFuturesStreamLiquidationData : BinanceStreamEvent /// /// The data of the event /// - [JsonProperty("o")] + [JsonPropertyName("o")] public BinanceFuturesStreamLiquidation Data { get; set; } = default!; } @@ -24,67 +24,67 @@ public record BinanceFuturesStreamLiquidation : IBinanceFuturesLiquidation /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Liquidation Sided /// - [JsonProperty("S"), JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("S")] public OrderSide Side { get; set; } /// /// Liquidation order type /// - [JsonProperty("o"), JsonConverter(typeof(FuturesOrderTypeConverter))] + [JsonPropertyName("o")] public FuturesOrderType Type { get; set; } /// /// Liquidation Time in Force /// - [JsonProperty("f"), JsonConverter(typeof(TimeInForceConverter))] + [JsonPropertyName("f")] public TimeInForce TimeInForce { get; set; } /// /// Liquidation Original Quantity /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal Quantity { get; set; } /// /// Liquidation order price /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal Price { get; set; } /// /// Liquidation Average Price /// - [JsonProperty("ap")] + [JsonPropertyName("ap")] public decimal AveragePrice { get; set; } /// /// Liquidation Order Status /// - [JsonProperty("X"), JsonConverter(typeof(OrderStatusConverter))] + [JsonPropertyName("X")] public OrderStatus Status { get; set; } /// /// Liquidation Last Filled Quantity /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal LastQuantityFilled { get; set; } /// /// Liquidation Accumulated fill quantity /// - [JsonProperty("z")] + [JsonPropertyName("z")] public decimal QuantityFilled { get; set; } /// /// Liquidation Trade Time /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarginUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarginUpdate.cs index c0bc28a96..0024463bc 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarginUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarginUpdate.cs @@ -11,12 +11,12 @@ public record BinanceFuturesStreamMarginUpdate : BinanceStreamEvent /// /// Cross Wallet Balance. Only pushed with crossed position margin call /// - [JsonProperty("cw")] + [JsonPropertyName("cw")] public decimal? CrossWalletBalance { get; set; } /// /// Positions /// - [JsonProperty("p")] + [JsonPropertyName("p")] public IEnumerable Positions { get; set; } = Array.Empty(); /// @@ -33,49 +33,49 @@ public record BinanceFuturesStreamMarginPosition /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Position Side /// - [JsonProperty("ps"), JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("ps")] public PositionSide PositionSide { get; set; } /// /// Position quantity /// - [JsonProperty("pa")] + [JsonPropertyName("pa")] public decimal PositionQuantity { get; set; } /// /// Margin type /// - [JsonProperty("mt"), JsonConverter(typeof(FuturesMarginTypeConverter))] + [JsonPropertyName("mt")] public FuturesMarginType MarginType { get; set; } /// /// Isolated Wallet (if isolated position) /// - [JsonProperty("iw")] + [JsonPropertyName("iw")] public decimal IsolatedWallet { get; set; } /// /// Mark Price /// - [JsonProperty("mp")] + [JsonPropertyName("mp")] public decimal MarkPrice { get; set; } /// /// Unrealized PnL /// - [JsonProperty("up")] + [JsonPropertyName("up")] public decimal UnrealizedPnl { get; set; } /// /// Maintenance Margin Required /// - [JsonProperty("mm")] + [JsonPropertyName("mm")] public decimal MaintMargin { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarkPrice.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarkPrice.cs index 94970a3d2..80f350da0 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarkPrice.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamMarkPrice.cs @@ -10,31 +10,31 @@ public record BinanceFuturesStreamMarkPrice: BinanceStreamEvent, IBinanceFutures /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Mark Price /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal MarkPrice { get; set; } /// /// Estimated Settle Price, only useful in the last hour before the settlement starts /// - [JsonProperty("P")] + [JsonPropertyName("P")] public decimal EstimatedSettlePrice { get; set; } /// /// Next Funding Rate /// - [JsonProperty("r")] + [JsonPropertyName("r")] public decimal? FundingRate { get; set; } /// /// Next Funding Time /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime NextFundingTime { get; set; } } @@ -46,7 +46,7 @@ public record BinanceFuturesUsdtStreamMarkPrice : BinanceFuturesStreamMarkPrice /// /// Mark Price /// - [JsonProperty("i")] + [JsonPropertyName("i")] public decimal IndexPrice { get; set; } } @@ -58,13 +58,13 @@ public record BinanceFuturesCoinStreamMarkPrice : BinanceFuturesStreamMarkPrice /// /// Mark Price /// - [JsonProperty("P")] + [JsonPropertyName("P")] public new decimal EstimatedSettlePrice { get; set; } /// /// Mark Price /// - [JsonProperty("i")] + [JsonPropertyName("i")] public decimal IndexPrice { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderBookDepth.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderBookDepth.cs index 7d2f61253..bf3aa9e96 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderBookDepth.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderBookDepth.cs @@ -10,45 +10,45 @@ public record BinanceFuturesStreamOrderBookDepth : BinanceStreamEvent, IBinanceF /// /// The symbol of the order book (only filled from stream updates) /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The time the event happened /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TransactionTime { get; set; } /// /// The ID of the first update /// - [JsonProperty("U")] + [JsonPropertyName("U")] public long? FirstUpdateId { get; set; } /// /// The ID of the last update /// - [JsonProperty("u")] + [JsonPropertyName("u")] public long LastUpdateId { get; set; } /// /// The ID of the last update Id in last stream /// - [JsonProperty("pu")] + [JsonPropertyName("pu")] public long LastUpdateIdStream { get; set; } /// /// The list of diff bids /// - [JsonProperty("b")] + [JsonPropertyName("b")] public IEnumerable Bids { get; set; } = Array.Empty(); /// /// The list of diff asks /// - [JsonProperty("a")] + [JsonPropertyName("a")] public IEnumerable Asks { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderUpdate.cs index bc03d3ff6..1d7cfe4cf 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamOrderUpdate.cs @@ -11,13 +11,13 @@ public record BinanceFuturesStreamOrderUpdate: BinanceStreamEvent /// /// Update data /// - [JsonProperty("o")] + [JsonPropertyName("o")] public BinanceFuturesStreamOrderUpdateData UpdateData { get; set; } = new BinanceFuturesStreamOrderUpdateData(); /// /// Transaction time /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T")] public DateTime TransactionTime { get; set; } /// /// The listen key the update was for @@ -33,172 +33,172 @@ public record BinanceFuturesStreamOrderUpdateData /// /// The symbol the order is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The new client order id /// - [JsonProperty("c")] + [JsonPropertyName("c")] public string ClientOrderId { get; set; } = string.Empty; /// /// The side of the order /// - [JsonProperty("S"), JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("S")] public OrderSide Side { get; set; } /// /// The type of the order /// - [JsonProperty("o"), JsonConverter(typeof(FuturesOrderTypeConverter))] + [JsonPropertyName("o")] public FuturesOrderType Type { get; set; } /// /// The timespan the order is active /// - [JsonProperty("f"), JsonConverter(typeof(TimeInForceConverter))] + [JsonPropertyName("f")] public TimeInForce TimeInForce { get; set; } /// /// The quantity of the order /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal Quantity { get; set; } /// /// The price of the order /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal Price { get; set; } /// /// The average price of the order /// - [JsonProperty("ap")] + [JsonPropertyName("ap")] public decimal AveragePrice { get; set; } /// /// The stop price of the order /// - [JsonProperty("sp")] + [JsonPropertyName("sp")] public decimal StopPrice { get; set; } /// /// The execution type /// - [JsonProperty("x"), JsonConverter(typeof(ExecutionTypeConverter))] + [JsonPropertyName("x")] public ExecutionType ExecutionType { get; set; } /// /// The status of the order /// - [JsonProperty("X"), JsonConverter(typeof(OrderStatusConverter))] + [JsonPropertyName("X")] public OrderStatus Status { get; set; } /// /// The id of the order as assigned by Binance /// - [JsonProperty("i")] + [JsonPropertyName("i")] public long OrderId { get; set; } /// /// The quantity of the last filled trade of this order /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal QuantityOfLastFilledTrade { get; set; } /// /// The quantity of all trades that were filled for this order /// - [JsonProperty("z")] + [JsonPropertyName("z")] public decimal AccumulatedQuantityOfFilledTrades { get; set; } /// /// The price of the last filled trade /// - [JsonProperty("L")] + [JsonPropertyName("L")] public decimal PriceLastFilledTrade { get; set; } /// /// The fee payed /// - [JsonProperty("n")] + [JsonPropertyName("n")] public decimal Fee { get; set; } /// /// The asset the fee was taken from /// - [JsonProperty("N")] + [JsonPropertyName("N")] public string FeeAsset { get; set; } = string.Empty; /// /// The time of the update /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T")] public DateTime UpdateTime { get; set; } /// /// The trade id /// - [JsonProperty("t")] + [JsonPropertyName("t")] public long TradeId { get; set; } /// /// Bid Notional /// - [JsonProperty("b")] + [JsonPropertyName("b")] public decimal BidNotional { get; set; } /// /// Ask Notional /// - [JsonProperty("a")] + [JsonPropertyName("a")] public decimal AskNotional { get; set; } /// /// Whether the buyer is the maker /// - [JsonProperty("m")] + [JsonPropertyName("m")] public bool BuyerIsMaker { get; set; } /// /// Is this reduce only /// - [JsonProperty("R")] + [JsonPropertyName("R")] public bool IsReduce { get; set; } /// /// Stop price working type /// - [JsonProperty("wt"), JsonConverter(typeof(WorkingTypeConverter))] + [JsonPropertyName("wt")] public WorkingType StopPriceWorking { get; set; } /// /// Original Order Type /// - [JsonProperty("ot"), JsonConverter(typeof(FuturesOrderTypeConverter))] + [JsonPropertyName("ot")] public FuturesOrderType OriginalType { get; set; } /// /// Position side /// - [JsonProperty("ps"), JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("ps")] public PositionSide PositionSide { get; set; } /// /// If Close-All, only pushed with conditional order /// - [JsonProperty("cp")] + [JsonPropertyName("cp")] public bool PushedConditionalOrder { get; set; } /// /// Activation Price, only pushed with TRAILING_STOP_MARKET order /// - [JsonProperty("AP")] + [JsonPropertyName("AP")] public decimal ActivationPrice { get; set; } /// /// Callback Rate, only pushed with TRAILING_STOP_MARKET order /// - [JsonProperty("cr")] + [JsonPropertyName("cr")] public decimal CallbackRate { get; set; } /// /// Realized profit of the trade /// - [JsonProperty("rp")] + [JsonPropertyName("rp")] public decimal RealizedProfit { get; set; } /// /// Is price protection enable /// - [JsonProperty("pP")] + [JsonPropertyName("pP")] public bool PriceProtection { get; set; } /// /// Self trade prevention mode /// - [JsonProperty("V"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("V")] public SelfTradePreventionMode SelfTradePrevention { get; set; } /// /// Price match mode /// - [JsonProperty("pm"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("pm")] public PriceMatch PriceMatchMode { get; set; } /// /// The GoodTillDate if GTD time in force /// - [JsonProperty("gtd"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("gtd")] public DateTime? GoodTillDate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamSymbolUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamSymbolUpdate.cs index 020cbd77d..b92fd0f57 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamSymbolUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceFuturesStreamSymbolUpdate.cs @@ -10,41 +10,41 @@ public record BinanceFuturesStreamSymbolUpdate : BinanceStreamEvent /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Pair /// - [JsonProperty("ps")] + [JsonPropertyName("ps")] public string Pair { get; set; } = string.Empty; /// /// Contract type /// - [JsonProperty("ct")] + [JsonPropertyName("ct")] [JsonConverter(typeof(EnumConverter))] public ContractType ContractType { get; set; } /// /// Delivery date /// - [JsonProperty("dt")] + [JsonPropertyName("dt")] [JsonConverter(typeof(DateTimeConverter))] public DateTime? DeliveryDate { get; set; } /// /// Onboard date /// - [JsonProperty("ot")] + [JsonPropertyName("ot")] [JsonConverter(typeof(DateTimeConverter))] public DateTime? OnboardDate { get; set; } /// /// Symbol status /// - [JsonProperty("cs")] + [JsonPropertyName("cs")] [JsonConverter(typeof(EnumConverter))] public SymbolStatus Status { get; set; } /// /// Brackets /// - [JsonProperty("bks")] + [JsonPropertyName("bks")] public IEnumerable? Brackets { get; set; } } @@ -56,37 +56,37 @@ public record BinanceBracketUpdate /// /// Notional bracket /// - [JsonProperty("bs")] + [JsonPropertyName("bs")] public int NotionalBracket { get; set; } /// /// Floor notional /// - [JsonProperty("bnf")] + [JsonPropertyName("bnf")] public decimal FloorNotional { get; set; } /// /// Max notional /// - [JsonProperty("bnc")] + [JsonPropertyName("bnc")] public decimal MaxNotional { get; set; } /// /// Maintenance ratio /// - [JsonProperty("mmr")] + [JsonPropertyName("mmr")] public decimal MaintenanceRatio { get; set; } /// /// Min leverage /// - [JsonProperty("mi")] + [JsonPropertyName("mi")] public decimal MinLeverage { get; set; } /// /// Max leverage /// - [JsonProperty("ma")] + [JsonPropertyName("ma")] public decimal MaxLeverage { get; set; } /// /// Auxiliary number for quick calculation /// - [JsonProperty("cf")] + [JsonPropertyName("cf")] public decimal Auxiliary { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceGridUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceGridUpdate.cs index b5291e027..959c2e443 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceGridUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceGridUpdate.cs @@ -8,13 +8,13 @@ public record BinanceGridUpdate : BinanceStreamEvent /// /// Update info /// - [JsonProperty("gu")] + [JsonPropertyName("gu")] public BinanceGridInfo GridUpdate { get; set; } = null!; /// /// Transaction time /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TransactionTime { get; set; } } @@ -26,53 +26,53 @@ public record BinanceGridInfo /// /// The strategy id /// - [JsonProperty("si")] + [JsonPropertyName("si")] public int StrategyId { get; set; } /// /// Strategy type /// - [JsonProperty("st")] + [JsonPropertyName("st")] public string StrategyType { get; set; } = string.Empty; /// /// Stategy status /// - [JsonProperty("ss")] + [JsonPropertyName("ss")] public string StrategyStatus { get; set; } = string.Empty; /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Update time /// - [JsonProperty("ut")] + [JsonPropertyName("ut")] [JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateTime { get; set; } /// /// Realized profit and loss /// - [JsonProperty("r")] + [JsonPropertyName("r")] public decimal RealizedPnl { get; set; } /// /// Unmatched average price /// - [JsonProperty("up")] + [JsonPropertyName("up")] public decimal UnmatchedAveragePrice { get; set; } /// /// Unmatched quantity /// - [JsonProperty("uq")] + [JsonPropertyName("uq")] public decimal UnmatchedQuantity { get; set; } /// /// Unmatched fee /// - [JsonProperty("uf")] + [JsonPropertyName("uf")] public decimal UnmatchedFee { get; set; } /// /// Matched profit and loss /// - [JsonProperty("mp")] + [JsonPropertyName("mp")] public decimal MatchedPnl { get; set; } } } diff --git a/Binance.Net/Objects/Models/Futures/Socket/BinanceStrategyUpdate.cs b/Binance.Net/Objects/Models/Futures/Socket/BinanceStrategyUpdate.cs index 615dd16af..ab32b95c0 100644 --- a/Binance.Net/Objects/Models/Futures/Socket/BinanceStrategyUpdate.cs +++ b/Binance.Net/Objects/Models/Futures/Socket/BinanceStrategyUpdate.cs @@ -8,13 +8,13 @@ public record BinanceStrategyUpdate: BinanceStreamEvent /// /// Update info /// - [JsonProperty("su")] + [JsonPropertyName("su")] public BinanceStrategyInfo StrategyUpdate { get; set; } = null!; /// /// Transaction time /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TransactionTime { get; set; } } @@ -26,33 +26,33 @@ public record BinanceStrategyInfo /// /// The strategy id /// - [JsonProperty("si")] + [JsonPropertyName("si")] public int StrategyId { get; set; } /// /// Strategy type /// - [JsonProperty("st")] + [JsonPropertyName("st")] public string StrategyType { get; set; } = string.Empty; /// /// Stategy status /// - [JsonProperty("ss")] + [JsonPropertyName("ss")] public string StrategyStatus { get; set; } = string.Empty; /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Update time /// - [JsonProperty("ut")] + [JsonPropertyName("ut")] [JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateTime { get; set; } /// /// Op code /// - [JsonProperty("c")] + [JsonPropertyName("c")] public int OpCode { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Binance24hPrice.cs b/Binance.Net/Objects/Models/Spot/Binance24hPrice.cs index 05e622810..e915aa03c 100644 --- a/Binance.Net/Objects/Models/Spot/Binance24hPrice.cs +++ b/Binance.Net/Objects/Models/Spot/Binance24hPrice.cs @@ -10,33 +10,34 @@ public record Binance24HPrice : Binance24HPriceBase, IBinanceTick /// /// The close price 24 hours ago /// - [JsonProperty("prevClosePrice")] + [JsonPropertyName("prevClosePrice")] public decimal PrevDayClosePrice { get; set; } /// /// The best bid price in the order book /// - [JsonProperty("bidPrice")] + [JsonPropertyName("bidPrice")] public decimal BestBidPrice { get; set; } /// /// The quantity of the best bid price in the order book /// - [JsonProperty("bidQty")] + [JsonPropertyName("bidQty")] public decimal BestBidQuantity { get; set; } /// /// The best ask price in the order book /// - [JsonProperty("askPrice")] + [JsonPropertyName("askPrice")] public decimal BestAskPrice { get; set; } /// /// The quantity of the best ask price in the order book /// - [JsonProperty("askQty")] + [JsonPropertyName("askQty")] public decimal BestAskQuantity { get; set; } /// + [JsonPropertyName("volume")] public override decimal Volume { get; set; } /// - [JsonProperty("quoteVolume")] + [JsonPropertyName("quoteVolume")] public override decimal QuoteVolume { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceAPIKeyPermissions.cs b/Binance.Net/Objects/Models/Spot/BinanceAPIKeyPermissions.cs index e907e69c5..a7ddd6d4a 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceAPIKeyPermissions.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceAPIKeyPermissions.cs @@ -8,53 +8,64 @@ public record BinanceAPIKeyPermissions /// /// Whether the key is restricted to certain IP's or not /// + [JsonPropertyName("ipRestrict")] public bool IpRestrict { get; set; } /// /// Creation time of the key /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } /// /// This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals /// + [JsonPropertyName("enableWithdrawals")] public bool EnableWithdrawals { get; set; } /// /// This option authorizes this key to transfer funds between your master account and your sub account instantly /// + [JsonPropertyName("permitsUniversalTransfer")] public bool PermitsUniversalTransfer { get; set; } /// /// Authorizes this key to be used for a dedicated universal transfer API to transfer multiple supported currencies. Each business's own transfer API rights are not affected by this authorization /// + [JsonPropertyName("enableInternalTransfer")] public bool EnableInternalTransfer { get; set; } /// /// Authorizes this key to Vanilla options trading /// + [JsonPropertyName("enableVanillaOptions")] public bool EnableVanillaOptions { get; set; } /// /// Authorizes the reading of account info /// + [JsonPropertyName("enableReading")] public bool EnableReading { get; set; } /// /// Authorizes futures trading. API Key created before your futures account opened does not support futures API service /// + [JsonPropertyName("enableFutures")] public bool EnableFutures { get; set; } /// /// Authorizes margin. This option can be adjusted after the Cross Margin account transfer is completed /// + [JsonPropertyName("enableMargin")] public bool EnableMargin { get; set; } /// /// Spot and margin trading allowed /// + [JsonPropertyName("enableSpotAndMarginTrading")] public bool EnableSpotAndMarginTrading { get; set; } /// /// Portfolio margin trading enabled /// - [JsonProperty("enablePortfolioMarginTrading")] + [JsonPropertyName("enablePortfolioMarginTrading")] public bool EnablePortfolioMarginTrading { get; set; } /// /// Expiration time for spot and margin trading permission /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("tradingAuthorityExpirationTime")] public DateTime? TradingAuthorityExpirationTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceAccountInfo.cs b/Binance.Net/Objects/Models/Spot/BinanceAccountInfo.cs index 1f8db53ea..1f04842c0 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceAccountInfo.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceAccountInfo.cs @@ -11,72 +11,79 @@ public record BinanceAccountInfo /// /// Fee percentage to pay when making trades /// - [JsonProperty("makerCommission")] + [JsonPropertyName("makerCommission")] public decimal MakerFee { get; set; } /// /// Fee percentage to pay when taking trades /// - [JsonProperty("takerCommission")] + [JsonPropertyName("takerCommission")] public decimal TakerFee { get; set; } /// /// Fee percentage to pay when buying /// - [JsonProperty("buyerCommission")] + [JsonPropertyName("buyerCommission")] public decimal BuyerFee { get; set; } /// /// Fee percentage to pay when selling /// - [JsonProperty("sellerCommission")] + [JsonPropertyName("sellerCommission")] public decimal SellerFee { get; set; } /// /// Boolean indicating if this account can trade /// + [JsonPropertyName("canTrade")] public bool CanTrade { get; set; } /// /// Boolean indicating if this account can withdraw /// + [JsonPropertyName("canWithdraw")] public bool CanWithdraw { get; set; } /// /// Boolean indicating if this account can deposit /// + [JsonPropertyName("canDeposit")] public bool CanDeposit { get; set; } /// /// Account is brokered /// + [JsonPropertyName("brokered")] public bool Brokered { get; set; } /// /// Require self trade prevention /// - [JsonProperty("requireSelfTradePrevention")] + [JsonPropertyName("requireSelfTradePrevention")] public bool RequireSelfTradePrevention { get; set; } /// /// Prevent smart order routing /// - [JsonProperty("preventSor")] + [JsonPropertyName("preventSor")] public bool PreventSmartOrderRouting { get; set; } /// /// User id /// - [JsonProperty("uid")] + [JsonPropertyName("uid")] public long UserId { get; set; } /// /// The time of the update /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } /// /// The type of account /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("accountType")] public AccountType AccountType { get; set; } /// /// Permissions types /// - [JsonProperty(ItemConverterType = typeof(EnumConverter), ItemConverterParameters = new object[] { false, false })] + [JsonPropertyName("permissions")] public IEnumerable Permissions { get; set; } = Array.Empty(); /// /// List of assets with their current balances /// + [JsonPropertyName("balances")] public IEnumerable Balances { get; set; } = Array.Empty(); } @@ -88,15 +95,17 @@ public record BinanceBalance : IBinanceBalance /// /// The asset this balance is for /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The quantity that isn't locked in a trade /// - [JsonProperty("free")] + [JsonPropertyName("free")] public decimal Available { get; set; } /// /// The quantity that is currently locked in a trade /// + [JsonPropertyName("locked")] public decimal Locked { get; set; } /// /// The total balance of this asset (Free + Locked) diff --git a/Binance.Net/Objects/Models/Spot/BinanceAccountStatus.cs b/Binance.Net/Objects/Models/Spot/BinanceAccountStatus.cs index c04986ab0..80769c4c6 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceAccountStatus.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceAccountStatus.cs @@ -8,7 +8,7 @@ public record BinanceAccountStatus /// /// The result status /// - [JsonProperty("data")] + [JsonPropertyName("data")] public string? Data { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceAggregatedTrade.cs b/Binance.Net/Objects/Models/Spot/BinanceAggregatedTrade.cs index ef34a4427..516e9a5df 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceAggregatedTrade.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceAggregatedTrade.cs @@ -10,42 +10,42 @@ public record BinanceAggregatedTrade : IBinanceAggregatedTrade /// /// The id of this aggregation /// - [JsonProperty("a")] + [JsonPropertyName("a")] public long Id { get; set; } /// /// The price of trades in this aggregation /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal Price { get; set; } /// /// The total quantity of trades in the aggregation /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal Quantity { get; set; } /// /// The first trade id in this aggregation /// - [JsonProperty("f")] + [JsonPropertyName("f")] public long FirstTradeId { get; set; } /// /// The last trade id in this aggregation /// - [JsonProperty("l")] + [JsonPropertyName("l")] public long LastTradeId { get; set; } /// /// The timestamp of the trades /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TradeTime { get; set; } /// /// Whether the buyer was the maker /// - [JsonProperty("m")] + [JsonPropertyName("m")] public bool BuyerIsMaker { get; set; } /// /// Whether the trade was matched at the best price /// - [JsonProperty("M")] + [JsonPropertyName("M")] public bool WasBestPriceMatch { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceAutoConversionSettings.cs b/Binance.Net/Objects/Models/Spot/BinanceAutoConversionSettings.cs index fe4194f60..64aeb3857 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceAutoConversionSettings.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceAutoConversionSettings.cs @@ -8,15 +8,17 @@ public record BinanceAutoConversionSettings /// /// Is auto convert enabled /// + [JsonPropertyName("convertEnabled")] public bool ConvertEnabled { get; set; } /// /// Assets /// - [JsonProperty("coins")] + [JsonPropertyName("coins")] public IEnumerable Assets { get; set; } = Array.Empty(); /// /// Exchange rates /// + [JsonPropertyName("exchangeRates")] public Dictionary ExchangeRates { get; set; } = new Dictionary(); } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceAveragePrice.cs b/Binance.Net/Objects/Models/Spot/BinanceAveragePrice.cs index 2c42acfbd..8e17b55c5 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceAveragePrice.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceAveragePrice.cs @@ -8,17 +8,17 @@ public record BinanceAveragePrice /// /// Duration in minutes /// - [JsonProperty("mins")] + [JsonPropertyName("mins")] public int Minutes { get; set; } /// /// The average price /// - [JsonProperty("price")] + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// The last trade time /// - [JsonProperty("closeTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("closeTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime LastTradeTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceBnbBurnStatus.cs b/Binance.Net/Objects/Models/Spot/BinanceBnbBurnStatus.cs index 521f4a0d2..e4bb8cacb 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceBnbBurnStatus.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceBnbBurnStatus.cs @@ -8,10 +8,12 @@ public record BinanceBnbBurnStatus /// /// If spot trading BNB burn is enabled /// + [JsonPropertyName("spotBNBBurn")] public bool SpotBnbBurn { get; set; } /// /// If margin interest BNB burn is enabled /// + [JsonPropertyName("interestBNBBurn")] public bool InterestBnbBurn { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceBookPrice.cs b/Binance.Net/Objects/Models/Spot/BinanceBookPrice.cs index 570198e4e..812a5589b 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceBookPrice.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceBookPrice.cs @@ -10,36 +10,37 @@ public record BinanceBookPrice : IBinanceBookPrice /// /// Last trade update id /// - [JsonProperty("lastUpdateId")] + [JsonPropertyName("lastUpdateId")] public long LastUpdateId { get; set; } /// /// The symbol the information is about /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The highest bid price for the symbol /// - [JsonProperty("bidPrice")] + [JsonPropertyName("bidPrice")] public decimal BestBidPrice { get; set; } /// /// The quantity of the highest bid price currently in the order book /// - [JsonProperty("bidQty")] + [JsonPropertyName("bidQty")] public decimal BestBidQuantity { get; set; } /// /// The lowest ask price for the symbol /// - [JsonProperty("askPrice")] + [JsonPropertyName("askPrice")] public decimal BestAskPrice { get; set; } /// /// The quantity of the lowest ask price currently in the order book /// - [JsonProperty("askQty")] + [JsonPropertyName("askQty")] public decimal BestAskQuantity { get; set; } /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime? Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceBusdConvertResult.cs b/Binance.Net/Objects/Models/Spot/BinanceBusdConvertResult.cs index e274bdcbd..d382d4891 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceBusdConvertResult.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceBusdConvertResult.cs @@ -8,12 +8,12 @@ public record BinanceBusdConvertResult /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceBusdHistory.cs b/Binance.Net/Objects/Models/Spot/BinanceBusdHistory.cs index 620fb8f69..9b0d1a227 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceBusdHistory.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceBusdHistory.cs @@ -10,49 +10,49 @@ public record BinanceBusdHistory /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// Type /// - [JsonProperty("type")] + [JsonPropertyName("type")] [JsonConverter(typeof(EnumConverter))] - public BinanceBusdConvertType Type { get; set; } + public BusdConvertType Type { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Deducted asset /// - [JsonProperty("deductedAsset")] + [JsonPropertyName("deductedAsset")] public string DeductedAsset { get; set; } = string.Empty; /// /// Deducted quantity /// - [JsonProperty("deductedAmount")] + [JsonPropertyName("deductedAmount")] public decimal DeductedQuantity { get; set; } /// /// Target asset /// - [JsonProperty("targetAsset")] + [JsonPropertyName("targetAsset")] public string TargetAsset { get; set; } = string.Empty; /// /// Target quantity /// - [JsonProperty("targetAmount")] + [JsonPropertyName("targetAmount")] public decimal TargetQuantity { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Account type /// - [JsonProperty("accountType")] + [JsonPropertyName("accountType")] public string AccountType { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceC2CUserTrade.cs b/Binance.Net/Objects/Models/Spot/BinanceC2CUserTrade.cs index 1672fdef5..08f06ccb1 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceC2CUserTrade.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceC2CUserTrade.cs @@ -11,64 +11,74 @@ public record BinanceC2CUserTrade /// /// Order number /// + [JsonPropertyName("orderNumber")] public string OrderNumber { get; set; } = string.Empty; /// /// Advert number /// - [JsonProperty("advNo")] + [JsonPropertyName("advNo")] public string AdvertNumber { get; set; } = string.Empty; /// /// Trade type /// - [JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("tradeType")] public OrderSide TradeType { get; set; } /// /// Crypto asset traded /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Fiat type /// + [JsonPropertyName("fiat")] public string Fiat { get; set; } = string.Empty; /// /// Fiat symbol /// + [JsonPropertyName("fiatSymbol")] public string FiatSymbol { get; set; } = string.Empty; /// /// Quantity traded /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Total price of the trade /// + [JsonPropertyName("totalPrice")] public decimal TotalPrice { get; set; } /// /// Price per unit /// + [JsonPropertyName("unitPrice")] public decimal UnitPrice { get; set; } /// /// Order status /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("orderStatus")] public C2COrderStatus OrderStatus { get; set; } /// /// Creation time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } /// /// Transaction fee in crypto /// - [JsonProperty("commission")] + [JsonPropertyName("commission")] public decimal Fee { get; set; } /// /// Counter part nickname /// + [JsonPropertyName("counterPartNickName")] public string CounterPartNickName { get; set; } = string.Empty; /// /// Advertisement role /// + [JsonPropertyName("advertisementRole")] public string AdvertisementRole { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceCheckTime.cs b/Binance.Net/Objects/Models/Spot/BinanceCheckTime.cs index ee798761f..3a282a6b7 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceCheckTime.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceCheckTime.cs @@ -2,7 +2,7 @@ { internal record BinanceCheckTime { - [JsonProperty("serverTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("serverTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime ServerTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceCloudMiningHistory.cs b/Binance.Net/Objects/Models/Spot/BinanceCloudMiningHistory.cs index 3c4261ac4..8dbe31604 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceCloudMiningHistory.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceCloudMiningHistory.cs @@ -10,38 +10,38 @@ public record BinanceCloudMiningHistory /// /// Creation time /// - [JsonProperty("createTime")] + [JsonPropertyName("createTime")] [JsonConverter(typeof(DateTimeConverter))] public DateTime CreateTime { get; set; } /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// Type /// [JsonConverter(typeof(EnumConverter))] - [JsonProperty("type")] + [JsonPropertyName("type")] public CloudMiningPaymentStatus Type { get; set; } /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceCommissions.cs b/Binance.Net/Objects/Models/Spot/BinanceCommissions.cs new file mode 100644 index 000000000..c911dc517 --- /dev/null +++ b/Binance.Net/Objects/Models/Spot/BinanceCommissions.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Binance.Net.Objects.Models.Spot +{ + /// + /// Binance commissions + /// + public record BinanceCommissions + { + /// + /// Symbol name + /// + [JsonPropertyName("symbol")] + public string Symbol { get; set; } = string.Empty; + /// + /// Standard commission rates on trades from the order. + /// + [JsonPropertyName("standardCommission")] + public BinanceCommissionInfo StandardCommissions { get; set; } = null!; + /// + /// Tax commission rates for trades from the order. + /// + [JsonPropertyName("taxCommission")] + public BinanceCommissionInfo TaxCommissions { get; set; } = null!; + /// + /// Discount commission when paying in BNB + /// + [JsonPropertyName("discount")] + public BinanceDiscountInfo Discount { get; set; } = null!; + + } + + /// + /// Commission info + /// + public record BinanceDiscountInfo + { + /// + /// Standard commission is reduced by this rate when paying commission in BNB. + /// + [JsonPropertyName("discount")] + public decimal Discount { get; set; } + /// + /// Enabled for account + /// + [JsonPropertyName("enabledForAccount")] + public bool EnabledForAccount { get; set; } + /// + /// Enabled for symbol + /// + [JsonPropertyName("enabledForSymbol")] + public bool EnabledForSymbol { get; set; } + /// + /// Discount asset + /// + [JsonPropertyName("discountAsset")] + public string DiscountAsset { get; set; } = string.Empty; + } + + /// + /// Commission info + /// + public record BinanceCommissionInfo + { + /// + /// Maker fee + /// + [JsonPropertyName("maker")] + public decimal Maker { get; set; } + /// + /// Taker fee + /// + [JsonPropertyName("taker")] + public decimal Taker { get; set; } + /// + /// Buyer fee + /// + [JsonPropertyName("buyer")] + public decimal Buyer { get; set; } + /// + /// Seller fee + /// + [JsonPropertyName("seller")] + public decimal Sell { get; set; } + } +} diff --git a/Binance.Net/Objects/Models/Spot/BinanceDelistSchedule.cs b/Binance.Net/Objects/Models/Spot/BinanceDelistSchedule.cs index fe8fe9f89..e22ec5dc1 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceDelistSchedule.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceDelistSchedule.cs @@ -8,13 +8,13 @@ public record BinanceDelistSchedule /// /// Delist time /// - [JsonProperty("delistTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("delistTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime DelistTime { get; set; } /// /// Symbols being delisted /// - [JsonProperty("symbols")] + [JsonPropertyName("symbols")] public IEnumerable Symbols { get; set; } = new List(); } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceDepositAddress.cs b/Binance.Net/Objects/Models/Spot/BinanceDepositAddress.cs index 6eb22b3cd..ff7edbf21 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceDepositAddress.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceDepositAddress.cs @@ -8,19 +8,22 @@ public record BinanceDepositAddress /// /// The deposit address /// + [JsonPropertyName("address")] public string Address { get; set; } = string.Empty; /// /// Url /// + [JsonPropertyName("url")] public string Url { get; set; } = string.Empty; /// /// Address tag /// + [JsonPropertyName("tag")] public string Tag { get; set; } = string.Empty; /// /// Asset the address is for /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceDepositList.cs b/Binance.Net/Objects/Models/Spot/BinanceDepositList.cs index 9b7e1a19e..4a77a3b9a 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceDepositList.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceDepositList.cs @@ -12,65 +12,69 @@ public record BinanceDeposit /// Time the deposit was added to Binance /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("insertTime")] public DateTime InsertTime { get; set; } /// /// The quantity deposited /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// The asset deposited /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// The address of the deposit /// + [JsonPropertyName("address")] public string Address { get; set; } = string.Empty; /// /// The tag of the address of the deposit /// + [JsonPropertyName("addressTag")] public string AddressTag { get; set; } = string.Empty; /// /// The network /// + [JsonPropertyName("network")] public string Network { get; set; } = string.Empty; /// /// The id /// - [JsonProperty("id")] + [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; /// /// The transaction id /// - [JsonProperty("txId")] + [JsonPropertyName("txId")] public string TransactionId { get; set; } = string.Empty; /// /// The status of the deposit /// - [JsonConverter(typeof(DepositStatusConverter))] + [JsonPropertyName("status")] public DepositStatus Status { get; set; } /// /// The transfer type /// - [JsonConverter(typeof(WithdrawDepositTransferTypeConverter))] + [JsonPropertyName("transferType")] public WithdrawDepositTransferType TransferType { get; set; } /// /// Confirmations /// - [JsonProperty("confirmTimes")] + [JsonPropertyName("confirmTimes")] public string Confirmations { get; set; } = string.Empty; /// /// Network confirmations for unlocking /// - [JsonProperty("unlockConfirm")] - public string ConfirmationsForUnlock { get; set; } = string.Empty; + [JsonPropertyName("unlockConfirm")] + public int ConfirmationsForUnlock { get; set; } /// /// The wallet type /// - [JsonProperty("walletType")] + [JsonPropertyName("walletType")] [JsonConverter(typeof(EnumConverter))] public WalletType WalletType { get; set; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceDividendRecords.cs b/Binance.Net/Objects/Models/Spot/BinanceDividendRecords.cs index 99b94c1a8..273141a7b 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceDividendRecords.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceDividendRecords.cs @@ -8,30 +8,32 @@ public record BinanceDividendRecord /// /// Id /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Timestamp of the transaction /// - [JsonConverter(typeof(DateTimeConverter)), JsonProperty("divTime")] + [JsonConverter(typeof(DateTimeConverter)), JsonPropertyName("divTime")] public DateTime Timestamp { get; set; } /// /// Transaction id /// - [JsonProperty("tranId")] - public string TransactionId { get; set; } = string.Empty; + [JsonPropertyName("tranId")] + public long TransactionId { get; set; } /// /// Info /// - [JsonProperty("enInfo")] + [JsonPropertyName("enInfo")] public string? Info { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceDustLog.cs b/Binance.Net/Objects/Models/Spot/BinanceDustLog.cs index be9248654..8bcd4f34d 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceDustLog.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceDustLog.cs @@ -8,10 +8,12 @@ public record BinanceDustLogList /// /// Total counts of exchange /// + [JsonPropertyName("total")] public int Total { get; set; } /// /// Rows /// + [JsonPropertyName("userAssetDribblets")] public IEnumerable UserAssetDribblets { get; set; } = Array.Empty(); } @@ -23,27 +25,27 @@ public record BinanceDustLog /// /// Total transferred /// - [JsonProperty("totalTransferedAmount")] + [JsonPropertyName("totalTransferedAmount")] public decimal TransferredTotal { get; set; } /// /// Total service charge /// - [JsonProperty("totalServiceChargeAmount")] + [JsonPropertyName("totalServiceChargeAmount")] public decimal ServiceChargeTotal { get; set; } /// /// Transaction id /// - [JsonProperty("transId")] + [JsonPropertyName("transId")] public long TransactionId { get; set; } /// /// Detail logs /// - [JsonProperty("userAssetDribbletDetails")] + [JsonPropertyName("userAssetDribbletDetails")] public IEnumerable Logs { get; set; } = Array.Empty(); /// /// Timestamp /// - [JsonProperty("operateTime")] + [JsonPropertyName("operateTime")] [JsonConverter(typeof(DateTimeConverter))] public DateTime OperateTime { get; set; } } @@ -56,33 +58,33 @@ public record BinanceDustLogDetails /// /// Transaction id /// - [JsonProperty("transId")] + [JsonPropertyName("transId")] public long TransactionId { get; set; } /// /// Service charge /// - [JsonProperty("serviceChargeAmount")] + [JsonPropertyName("serviceChargeAmount")] public decimal ServiceChargeQuantity { get; set; } /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Timestamp /// - [JsonProperty("operateTime")] + [JsonPropertyName("operateTime")] [JsonConverter(typeof(DateTimeConverter))] public DateTime OperateTime { get; set; } /// /// Transferred quantity /// - [JsonProperty("transferedAmount")] + [JsonPropertyName("transferedAmount")] public decimal TransferredQuantity { get; set; } /// /// Asset /// - [JsonProperty("fromAsset")] + [JsonPropertyName("fromAsset")] public string FromAsset { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceDustTransferResult.cs b/Binance.Net/Objects/Models/Spot/BinanceDustTransferResult.cs index 4bf25a66a..b5bbe163e 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceDustTransferResult.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceDustTransferResult.cs @@ -8,16 +8,17 @@ public record BinanceDustTransferResult /// /// Total service charge /// - [JsonProperty("totalServiceCharge")] + [JsonPropertyName("totalServiceCharge")] public decimal TotalServiceCharge { get; set; } /// /// Total transferred /// - [JsonProperty("totalTransfered")] + [JsonPropertyName("totalTransfered")] public decimal TotalTransferred { get; set; } /// /// Transfer entries /// + [JsonPropertyName("transferResult")] public IEnumerable TransferResult { get; set; } = Array.Empty(); } @@ -29,31 +30,32 @@ public record BinanceDustTransferResultEntry /// /// Quantity of dust /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset /// + [JsonPropertyName("fromAsset")] public string FromAsset { get; set; } = string.Empty; /// /// Timestamp of conversion /// - [JsonConverter(typeof(DateTimeConverter)), JsonProperty("operateTime")] + [JsonConverter(typeof(DateTimeConverter)), JsonPropertyName("operateTime")] public DateTime Timestamp { get; set; } /// /// Service charge /// - [JsonProperty("serviceChargeAmount")] + [JsonPropertyName("serviceChargeAmount")] public decimal ServiceChargeQuantity { get; set; } /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// BNB result quantity /// - [JsonProperty("transferedAmount")] + [JsonPropertyName("transferedAmount")] public decimal TransferredQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceElligableDust.cs b/Binance.Net/Objects/Models/Spot/BinanceElligableDust.cs index 8fcab23cd..f1e5ebe23 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceElligableDust.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceElligableDust.cs @@ -8,21 +8,22 @@ public record BinanceElligableDusts /// /// Total BTC value /// - [JsonProperty("totalTransferBtc")] + [JsonPropertyName("totalTransferBtc")] public decimal TotalTransferBTC { get; set; } /// /// Total BNB value /// - [JsonProperty("totalTransferBNB")] + [JsonPropertyName("totalTransferBNB")] public decimal TotalTransferBNB { get; set; } /// /// Commission fee /// - [JsonProperty("dribbletPercentage")] + [JsonPropertyName("dribbletPercentage")] public decimal FeePercentage { get; set; } /// /// Assets /// + [JsonPropertyName("details")] public IEnumerable Details { get; set; } = Array.Empty(); } @@ -34,32 +35,37 @@ public record BinanceElligableDust /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Full name of the asset /// + [JsonPropertyName("assetFullName")] public string AssetFullName { get; set; } = string.Empty; /// /// Amount free /// - [JsonProperty("amountFree")] + [JsonPropertyName("amountFree")] public decimal QuantityFree { get; set; } /// /// BTC value /// + [JsonPropertyName("toBTC")] public decimal ToBTC { get; set; } /// /// BNB value without fee /// + [JsonPropertyName("toBNB")] public decimal ToBNB { get; set; } /// /// BNB value with fee /// + [JsonPropertyName("toBNBOffExchange")] public decimal ToBNBOffExchange { get; set; } /// /// Fee /// - [JsonProperty("exchange")] + [JsonPropertyName("exchange")] public decimal Fee { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceEventOrderBook.cs b/Binance.Net/Objects/Models/Spot/BinanceEventOrderBook.cs index ef8509931..9590fcc63 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceEventOrderBook.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceEventOrderBook.cs @@ -5,42 +5,47 @@ namespace Binance.Net.Objects.Models.Spot /// /// Stream order book /// - public record BinanceEventOrderBook: BinanceOrderBook, IBinanceEventOrderBook + public record BinanceEventOrderBook: IBinanceEventOrderBook { /// /// The id of this update, can be synced with BinanceClient.Spot.GetOrderBook to update the order book /// - [JsonProperty("U")] + [JsonPropertyName("U")] public long? FirstUpdateId { get; set; } /// /// Setter for last update id, need for Json.Net /// - [JsonProperty("u")] - internal long LastUpdateIdStream { set => LastUpdateId = value; } + [JsonPropertyName("u")] + public long LastUpdateId { get; set; } + + /// + /// The symbol of the order book + /// + [JsonPropertyName("s")] + public string Symbol { get; set; } = string.Empty; /// /// Event type /// - [JsonProperty("e")] + [JsonPropertyName("e")] internal string EventType { get; set; } = string.Empty; /// /// Event time of the update /// - [JsonProperty("E"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("E"), JsonConverter(typeof(DateTimeConverter))] public DateTime EventTime { get; set; } - + /// - /// Setter for bids (needed forJson.Net) + /// The list of bids /// - [JsonProperty("b")] - internal IEnumerable BidsStream { set => Bids = value; } - + [JsonPropertyName("b")] + public IEnumerable Bids { get; set; } = Array.Empty(); /// - /// Setter for asks (needed forJson.Net) + /// The list of asks /// - [JsonProperty("a")] - internal IEnumerable AsksStream { set => Asks = value; } + [JsonPropertyName("a")] + public IEnumerable Asks { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceExchangeInfo.cs b/Binance.Net/Objects/Models/Spot/BinanceExchangeInfo.cs index a404aa9eb..143b0aeee 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceExchangeInfo.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceExchangeInfo.cs @@ -8,23 +8,28 @@ public record BinanceExchangeInfo /// /// The timezone the server uses /// + [JsonPropertyName("timezone")] public string TimeZone { get; set; } = string.Empty; /// /// The current server time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("serverTime")] public DateTime ServerTime { get; set; } /// /// The rate limits used /// + [JsonPropertyName("rateLimits")] public IEnumerable RateLimits { get; set; } = Array.Empty(); /// /// All symbols supported /// + [JsonPropertyName("symbols")] public IEnumerable Symbols { get; set; } = Array.Empty(); /// /// Filters /// + [JsonPropertyName("exchangeFilters")] public IEnumerable ExchangeFilters { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceFiatPayment.cs b/Binance.Net/Objects/Models/Spot/BinanceFiatPayment.cs index 9208b4b92..6e17c4d52 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceFiatPayment.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceFiatPayment.cs @@ -11,55 +11,59 @@ public record BinanceFiatPayment /// /// Order number /// - [JsonProperty("orderNo")] + [JsonPropertyName("orderNo")] public string OrderNumber { get; set; } = string.Empty; /// /// The input quantity /// - [JsonProperty("sourceAmount")] + [JsonPropertyName("sourceAmount")] public decimal SourceQuantity { get; set; } /// /// The fiat asset /// - [JsonProperty("fiatCurrency")] + [JsonPropertyName("fiatCurrency")] public string FiatAsset { get; set; } = string.Empty; /// /// The output quantity /// - [JsonProperty("obtainAmount")] + [JsonPropertyName("obtainAmount")] public decimal ObtainQuantity { get; set; } /// /// The crypto asset /// - [JsonProperty("cryptoCurrency")] + [JsonPropertyName("cryptoCurrency")] public string CryptoAsset { get; set; } = string.Empty; /// /// The total fee of the order /// + [JsonPropertyName("totalFee")] public decimal TotalFee { get; set; } /// /// The price of the order /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// The status of the order /// - [JsonConverter(typeof(FiatPaymentStatusConverter))] + [JsonPropertyName("status")] public FiatPaymentStatus Status { get; set; } /// /// The payment method /// - [JsonProperty("paymentMethod")] + [JsonPropertyName("paymentMethod")] public string PaymentMethod { get; set; } = string.Empty; /// /// Creation time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceFiatWithdrawDeposit.cs b/Binance.Net/Objects/Models/Spot/BinanceFiatWithdrawDeposit.cs index 34ae53615..4e088c9e6 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceFiatWithdrawDeposit.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceFiatWithdrawDeposit.cs @@ -11,45 +11,49 @@ public record BinanceFiatWithdrawDeposit /// /// Order number /// - [JsonProperty("orderNo")] + [JsonPropertyName("orderNo")] public string OrderNumber { get; set; } = string.Empty; /// /// The used asset /// - [JsonProperty("fiatCurrency")] + [JsonPropertyName("fiatCurrency")] public string FiatAsset { get; set; } = string.Empty; /// /// The quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// The indicated quantity /// - [JsonProperty("indicatedAmount")] + [JsonPropertyName("indicatedAmount")] public decimal IndicatedQuantity { get; set; } /// /// The method /// + [JsonPropertyName("method")] public string Method { get; set; } = string.Empty; /// /// The total fee of the order /// + [JsonPropertyName("totalFee")] public decimal TotalFee { get; set; } /// /// The status /// - [JsonConverter(typeof(FiatWithdrawDepositStatusConverter))] + [JsonPropertyName("status")] public FiatWithdrawDepositStatus Status { get; set; } /// /// Creation time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceFundingAsset.cs b/Binance.Net/Objects/Models/Spot/BinanceFundingAsset.cs index bec3fa785..f8912f2af 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceFundingAsset.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceFundingAsset.cs @@ -8,27 +8,32 @@ public record BinanceFundingAsset /// /// The asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Quantity available /// - [JsonProperty("free")] + [JsonPropertyName("free")] public decimal Available { get; set; } /// /// Quantity locked /// + [JsonPropertyName("locked")] public decimal Locked { get; set; } /// /// Quantity frozen /// + [JsonPropertyName("freeze")] public decimal Freeze { get; set; } /// /// Quantity withdrawing /// + [JsonPropertyName("withdrawing")] public decimal Withdrawing { get; set; } /// /// Value in btc /// + [JsonPropertyName("btcValuation")] public decimal BtcValuation { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceFuturesAccountSnapshot.cs b/Binance.Net/Objects/Models/Spot/BinanceFuturesAccountSnapshot.cs index fad866be8..580b12916 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceFuturesAccountSnapshot.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceFuturesAccountSnapshot.cs @@ -13,18 +13,19 @@ public record BinanceFuturesAccountSnapshot /// /// Timestamp of the data /// - [JsonConverter(typeof(DateTimeConverter)), JsonProperty("updateTime")] + [JsonConverter(typeof(DateTimeConverter)), JsonPropertyName("updateTime")] public DateTime Timestamp { get; set; } /// /// Account type the data is for /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("type")] public AccountType Type { get; set; } /// /// Snapshot data /// - [JsonProperty("data")] + [JsonPropertyName("data")] public BinanceFuturesAccountSnapshotData Data { get; set; } = default!; } @@ -36,10 +37,12 @@ public record BinanceFuturesAccountSnapshotData /// /// List of assets /// + [JsonPropertyName("assets")] public IEnumerable Assets { get; set; } = Array.Empty(); /// /// List of positions /// + [JsonPropertyName("position")] public IEnumerable Position { get; set; } = Array.Empty(); } @@ -51,14 +54,17 @@ public record BinanceFuturesAsset /// /// Name of the asset /// + [JsonPropertyName("asset")] public string? Asset { get; set; } /// /// Margin balance /// + [JsonPropertyName("marginBalance")] public decimal MarginBalance { get; set; } /// /// Wallet balance /// + [JsonPropertyName("walletBalance")] public decimal? WalletBalance { get; set; } } @@ -70,22 +76,27 @@ public record BinanceFuturesSnapshotPosition /// /// The symbol /// + [JsonPropertyName("symbol")] public string? Symbol { get; set; } /// /// Entry price /// + [JsonPropertyName("entryPrice")] public decimal EntryPrice { get; set; } /// /// Mark price /// + [JsonPropertyName("markPrice")] public decimal? MarkPrice { get; set; } /// - /// PositionAmt + /// Position amount /// + [JsonPropertyName("positionAmt")] public decimal? PositionAmt { get; set; } /// /// Unrealized profit /// + [JsonPropertyName("unRealizedProfit")] public decimal? UnrealizedProfit { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceIpRestriction.cs b/Binance.Net/Objects/Models/Spot/BinanceIpRestriction.cs index c724723a6..47831a1e2 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceIpRestriction.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceIpRestriction.cs @@ -8,20 +8,23 @@ public record BinanceIpRestriction /// /// Is currently restricted /// - [JsonProperty("ipRestrict")] + [JsonPropertyName("ipRestrict")] public bool IpRestricted { get; set; } /// /// Ip whitelist /// + [JsonPropertyName("ipList")] public IEnumerable IpList { get; set; } = Array.Empty(); /// /// Update Time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } /// /// The API key /// + [JsonPropertyName("apiKey")] public string ApiKey { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceListResult.cs b/Binance.Net/Objects/Models/Spot/BinanceListResult.cs index ee117f858..709b14edf 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceListResult.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceListResult.cs @@ -10,24 +10,28 @@ public record BinanceListResult /// Data start time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("startTime")] public DateTime StartTime { get; set; } /// /// Emd to,e /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("endTime")] public DateTime EndTime { get; set; } /// /// Limit /// + [JsonPropertyName("limit")] public int Limit { get; set; } /// /// More data available /// + [JsonPropertyName("moreData")] public bool MoreData { get; set; } /// /// The data /// - [JsonProperty("list")] + [JsonPropertyName("list")] public IEnumerable Data { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceListenKey.cs b/Binance.Net/Objects/Models/Spot/BinanceListenKey.cs index 731c2f534..712da0d8f 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceListenKey.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceListenKey.cs @@ -2,6 +2,7 @@ { internal record BinanceListenKey { + [JsonPropertyName("listenKey")] public string ListenKey { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceOrderBook.cs b/Binance.Net/Objects/Models/Spot/BinanceOrderBook.cs index 593881530..e030ea4ba 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceOrderBook.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceOrderBook.cs @@ -10,23 +10,25 @@ public record BinanceOrderBook : IBinanceOrderBook /// /// The symbol of the order book /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The ID of the last update /// - [JsonProperty("lastUpdateId")] + [JsonPropertyName("lastUpdateId")] public long LastUpdateId { get; set; } /// /// The list of bids /// + [JsonPropertyName("bids")] public IEnumerable Bids { get; set; } = Array.Empty(); /// /// The list of asks /// + [JsonPropertyName("asks")] public IEnumerable Asks { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceOrderOcoList.cs b/Binance.Net/Objects/Models/Spot/BinanceOrderOcoList.cs index caf3356f5..c7f055972 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceOrderOcoList.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceOrderOcoList.cs @@ -11,42 +11,48 @@ public record BinanceOrderOcoList /// /// The id of the order list /// - [JsonProperty("orderListId")] + [JsonPropertyName("orderListId")] public long Id { get; set; } /// /// The contingency type /// + [JsonPropertyName("contingencyType")] public string ContingencyType { get; set; } = string.Empty; /// /// The order list status /// - [JsonConverter(typeof(ListStatusTypeConverter))] + [JsonPropertyName("listStatusType")] public ListStatusType ListStatusType { get; set; } /// /// The order status /// - [JsonConverter(typeof(ListOrderStatusConverter))] + [JsonPropertyName("listOrderStatus")] public ListOrderStatus ListOrderStatus { get; set; } /// /// The client id of the order list /// + [JsonPropertyName("listClientOrderId")] public string ListClientOrderId { get; set; } = string.Empty; /// /// The transaction time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("transactionTime")] public DateTime TransactionTime { get; set; } /// /// The symbol of the order list /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The order in this list /// + [JsonPropertyName("orders")] public IEnumerable Orders { get; set; } = Array.Empty(); /// /// The order details /// + [JsonPropertyName("orderReports")] public IEnumerable OrderReports { get; set; } = Array.Empty(); } @@ -58,14 +64,17 @@ public record BinanceOrderId /// /// The symbol of the order /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The id of the order /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// The client order id /// + [JsonPropertyName("clientOrderId")] public string ClientOrderId { get; set; } = string.Empty; } @@ -74,10 +83,5 @@ public record BinanceOrderId /// public record BinancePlacedOcoOrder: BinanceOrderBase { - /// - /// The time the order was placed - /// - [JsonProperty("transactTime"), JsonConverter(typeof(DateTimeConverter))] - public new DateTime CreateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceOrderRateLimit.cs b/Binance.Net/Objects/Models/Spot/BinanceOrderRateLimit.cs index de8e9bf36..0977d6aa5 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceOrderRateLimit.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceOrderRateLimit.cs @@ -8,6 +8,7 @@ public record BinanceCurrentRateLimit: BinanceRateLimit /// /// The current used amount /// + [JsonPropertyName("count")] public int Count { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceOrderTrade.cs b/Binance.Net/Objects/Models/Spot/BinanceOrderTrade.cs index 04eca2a73..f519e98b1 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceOrderTrade.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceOrderTrade.cs @@ -8,26 +8,27 @@ public record BinanceOrderTrade /// /// The id of the trade /// - [JsonProperty("tradeId")] + [JsonPropertyName("tradeId")] public long Id { get; set; } /// /// Price of the trade /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// Quantity of the trade /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// Fee paid over this trade /// - [JsonProperty("commission")] + [JsonPropertyName("commission")] public decimal Fee { get; set; } /// /// The asset the fee is paid in /// - [JsonProperty("commissionAsset")] + [JsonPropertyName("commissionAsset")] public string FeeAsset { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinancePayTrade.cs b/Binance.Net/Objects/Models/Spot/BinancePayTrade.cs index f8a65f38c..424f064cc 100644 --- a/Binance.Net/Objects/Models/Spot/BinancePayTrade.cs +++ b/Binance.Net/Objects/Models/Spot/BinancePayTrade.cs @@ -10,71 +10,74 @@ public record BinancePayTrade /// /// Uid /// - [JsonProperty("uid")] + [JsonPropertyName("uid")] public long? Uid { get; set; } /// /// Counter party id /// - [JsonProperty("counterpartyId")] + [JsonPropertyName("counterpartyId")] public long? CounterPartyId { get; set; } /// /// Order id /// - [JsonProperty("orderId")] + [JsonPropertyName("orderId")] public string OrderId { get; set; } = string.Empty; /// /// Note /// - [JsonProperty("note")] + [JsonPropertyName("note")] public string? Note { get; set; } /// /// Order type /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("orderType")] public PayOrderType OrderType { get; set; } /// /// Transaction id /// + [JsonPropertyName("transactionId")] public string TransactionId { get; set; } = string.Empty; /// /// Transaction time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("transactionTime")] public DateTime TransactionTime { get; set; } /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Total fee /// - [JsonProperty("totalPaymentFee")] + [JsonPropertyName("totalPaymentFee")] public decimal TotalPaymentFee { get; set; } /// /// Asset /// - [JsonProperty("currency")] + [JsonPropertyName("currency")] public string Asset { get; set; } = string.Empty; /// /// Main wallet type /// - [JsonProperty("walletType"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("walletType"), JsonConverter(typeof(EnumConverter))] public PayWalletType WalletType { get; set; } /// /// Fund details /// - [JsonProperty("fundsDetail")] + [JsonPropertyName("fundsDetail")] public IEnumerable Details { get; set; } = Array.Empty(); /// /// Payer info /// - [JsonProperty("payerInfo")] + [JsonPropertyName("payerInfo")] public BinancePayTradeParticipantInfo PayerInfo { get; set; } = new BinancePayTradeParticipantInfo(); /// /// Receiver info /// - [JsonProperty("receiverInfo")] + [JsonPropertyName("receiverInfo")] public BinancePayTradeParticipantInfo ReceiverInfo { get; set; } = new BinancePayTradeParticipantInfo(); } @@ -86,12 +89,12 @@ public record BinancePayTradeDetails /// /// Asset /// - [JsonProperty("currency")] + [JsonPropertyName("currency")] public string Asset { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } } @@ -103,47 +106,47 @@ public record BinancePayTradeParticipantInfo /// /// Nickname or merchant name /// - [JsonProperty("name")] + [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; /// /// Account type,USER for personal,MERCHANT for merchant /// - [JsonProperty("type")] + [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; /// /// Email /// - [JsonProperty("email")] + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Binance uid /// - [JsonProperty("binanceId")] - public string BinanceId { get; set; } = string.Empty; + [JsonPropertyName("binanceId")] + public long BinanceId { get; set; } /// /// Binance pay id /// - [JsonProperty("accountId")] - public string AccountId { get; set; } = string.Empty; + [JsonPropertyName("accountId")] + public long AccountId { get; set; } /// /// International area code /// - [JsonProperty("countryCode")] - public string CountryCode { get; set; } = string.Empty; + [JsonPropertyName("countryCode")] + public long CountryCode { get; set; } /// /// Phone number /// - [JsonProperty("phoneNumber")] + [JsonPropertyName("phoneNumber")] public string PhoneNumber { get; set; } = string.Empty; /// /// Country code /// - [JsonProperty("mobileCode")] + [JsonPropertyName("mobileCode")] public string MobileCode { get; set; } = string.Empty; /// /// Unmask data /// - [JsonProperty("unmaskData")] + [JsonPropertyName("unmaskData")] public bool? UnmaskData { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinancePlacedOrder.cs b/Binance.Net/Objects/Models/Spot/BinancePlacedOrder.cs index b3580c79f..5a0842544 100644 --- a/Binance.Net/Objects/Models/Spot/BinancePlacedOrder.cs +++ b/Binance.Net/Objects/Models/Spot/BinancePlacedOrder.cs @@ -5,26 +5,22 @@ /// public record BinancePlacedOrder: BinanceOrderBase { - /// - /// The time the order was placed - /// - [JsonProperty("transactTime"), JsonConverter(typeof(DateTimeConverter))] - public new DateTime CreateTime { get; set; } /// /// Trades for the order /// - [JsonProperty("fills")] + [JsonPropertyName("fills")] public IEnumerable? Trades { get; set; } /// /// Only present if a margin trade happened /// - [JsonProperty("marginBuyBorrowAmount")] + [JsonPropertyName("marginBuyBorrowAmount")] public decimal? MarginBuyBorrowQuantity { get; set; } /// /// Only present if a margin trade happened /// + [JsonPropertyName("marginBuyBorrowAsset")] public string? MarginBuyBorrowAsset { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinancePreventedTrade.cs b/Binance.Net/Objects/Models/Spot/BinancePreventedTrade.cs index 4e0926370..c340b4652 100644 --- a/Binance.Net/Objects/Models/Spot/BinancePreventedTrade.cs +++ b/Binance.Net/Objects/Models/Spot/BinancePreventedTrade.cs @@ -10,40 +10,49 @@ public record BinancePreventedTrade /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Match id /// + [JsonPropertyName("preventedMatchId")] public long PreventedMatchId { get; set; } /// /// Taker order id /// + [JsonPropertyName("takerOrderId")] public long TakerOrderId { get; set; } /// /// Maker order id /// + [JsonPropertyName("makerOrderId")] public long MakerOrderId { get; set; } /// /// Trade group id /// + [JsonPropertyName("tradeGroupId")] public long TradeGroupId { get; set; } /// /// Self trade prevention mode /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("selfTradePreventionMode")] public SelfTradePreventionMode SelfTradePreventionMode { get; set; } /// /// Trade price /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// Prevented quantity /// + [JsonPropertyName("makerPreventedQuantity")] public decimal MakerPreventedQuantity { get; set; } /// /// Transaction time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("transactTime")] public DateTime TransactTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinancePrice.cs b/Binance.Net/Objects/Models/Spot/BinancePrice.cs index 171168cad..3146427d5 100644 --- a/Binance.Net/Objects/Models/Spot/BinancePrice.cs +++ b/Binance.Net/Objects/Models/Spot/BinancePrice.cs @@ -8,15 +8,17 @@ public record BinancePrice /// /// The symbol the price is for /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The price of the symbol /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime? Timestamp { get; set; } } @@ -28,7 +30,7 @@ public record BinanceFuturesCoinPrice: BinancePrice /// /// Name of the pair /// - [JsonProperty("ps")] + [JsonPropertyName("ps")] public string Pair { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceProduct.cs b/Binance.Net/Objects/Models/Spot/BinanceProduct.cs index 666230eaf..f19d7cf28 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceProduct.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceProduct.cs @@ -8,169 +8,169 @@ public record BinanceProduct /// /// Name of the symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Status of the symbol /// - [JsonProperty("st")] + [JsonPropertyName("st")] public string Status { get; set; } = string.Empty; /// /// Name of the base asset /// - [JsonProperty("b")] + [JsonPropertyName("b")] public string BaseAsset { get; set; } = string.Empty; /// /// Name of the quote asset /// - [JsonProperty("q")] + [JsonPropertyName("q")] public string QuoteAsset { get; set; } = string.Empty; /// /// Char of the base asset /// - [JsonProperty("ba")] + [JsonPropertyName("ba")] public string? BaseAssetChar { get; set; } /// /// Char of the quote asset /// - [JsonProperty("qa")] + [JsonPropertyName("qa")] public string? QuoteAssetChar { get; set; } /// /// Base asset name /// - [JsonProperty("an")] + [JsonPropertyName("an")] public string BaseAssetName { get; set; } = string.Empty; /// /// Quote asset name /// - [JsonProperty("qn")] + [JsonPropertyName("qn")] public string QuoteAssetName { get; set; } = string.Empty; /// /// Open price /// - [JsonProperty("o")] + [JsonPropertyName("o")] public decimal? OpenPrice { get; set; } /// /// High price /// - [JsonProperty("h")] + [JsonPropertyName("h")] public decimal? HighPrice { get; set; } /// /// Low price /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal? LowPrice { get; set; } /// /// Close price /// - [JsonProperty("c")] + [JsonPropertyName("c")] public decimal? ClosePrice { get; set; } /// /// Base volume /// - [JsonProperty("v")] + [JsonPropertyName("v")] public decimal Volume { get; set; } /// /// Quote volume /// - [JsonProperty("qv")] + [JsonPropertyName("qv")] public decimal QuoteVolume { get; set; } /// /// Amount of coins in circulation /// - [JsonProperty("cs")] + [JsonPropertyName("cs")] public decimal? CirculatingSupply { get; set; } /// /// Tags /// - [JsonProperty("tags")] + [JsonPropertyName("tags")] public IEnumerable Tags { get; set; } = Array.Empty(); /// /// Is Etf enabled /// - [JsonProperty("etf")] + [JsonPropertyName("etf")] public bool? LeveragedTokenTrading { get; set; } /// /// /// - [JsonProperty("i")] + [JsonPropertyName("i")] public decimal? I { get; set; } /// /// /// - [JsonProperty("ts")] + [JsonPropertyName("ts")] public decimal? Ts { get; set; } /// /// /// - [JsonProperty("y")] + [JsonPropertyName("y")] public decimal? Y { get; set; } /// /// /// - [JsonProperty("as")] + [JsonPropertyName("as")] public decimal? As { get; set; } /// /// /// - [JsonProperty("pn")] + [JsonPropertyName("pn")] public string? Pn { get; set; } /// /// /// - [JsonProperty("pm")] + [JsonPropertyName("pm")] public string? Pm { get; set; } /// /// /// - [JsonProperty("pom")] + [JsonPropertyName("pom")] public bool? Pom { get; set; } /// /// /// - [JsonProperty("pomt")] + [JsonPropertyName("pomt")] public bool? Pomt { get; set; } /// /// /// - [JsonProperty("lc")] + [JsonPropertyName("lc")] public bool? Lc { get; set; } /// /// /// - [JsonProperty("g")] + [JsonPropertyName("g")] public bool? G { get; set; } /// /// /// - [JsonProperty("sd")] + [JsonPropertyName("sd")] public bool? Sd { get; set; } /// /// /// - [JsonProperty("r")] + [JsonPropertyName("r")] public bool? R { get; set; } /// /// /// - [JsonProperty("hd")] + [JsonPropertyName("hd")] public bool? Hd { get; set; } /// /// /// - [JsonProperty("rb")] + [JsonPropertyName("rb")] public bool? Rb { get; set; } /// /// /// - [JsonProperty("ks")] + [JsonPropertyName("ks")] public bool? Ks { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceRebate.cs b/Binance.Net/Objects/Models/Spot/BinanceRebate.cs index 5d87cc24c..7d5dd6f34 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceRebate.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceRebate.cs @@ -10,19 +10,22 @@ public record BinanceRebateWrapper /// /// The current page /// + [JsonPropertyName("page")] public int Page { get; set; } /// /// Total number of records /// + [JsonPropertyName("totalRecords")] public int TotalRecords { get; set; } /// /// Total number of pages /// - [JsonProperty("totalPageNum")] + [JsonPropertyName("totalPageNum")] public int TotalPages { get; set; } /// /// Rebate data for this page /// + [JsonPropertyName("data")] public IEnumerable Data { get; set; } = Array.Empty(); } @@ -34,20 +37,23 @@ public record BinanceRebate /// /// The asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Type of rebate /// + [JsonPropertyName("type")] public RebateType Type { get; set; } /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Last udpate time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceRecentTrade.cs b/Binance.Net/Objects/Models/Spot/BinanceRecentTrade.cs index 1cf05cce1..e102bfc5e 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceRecentTrade.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceRecentTrade.cs @@ -10,11 +10,12 @@ public abstract record BinanceRecentTrade: IBinanceRecentTrade /// /// The id of the trade /// - [JsonProperty("id")] + [JsonPropertyName("id")] public long OrderId { get; set; } /// /// The price of the trade /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// public abstract decimal BaseQuantity { get; set; } @@ -23,16 +24,17 @@ public abstract record BinanceRecentTrade: IBinanceRecentTrade /// /// The timestamp of the trade /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime TradeTime { get; set; } /// /// Whether the buyer is maker /// - [JsonProperty("isBuyerMaker")] + [JsonPropertyName("isBuyerMaker")] public bool BuyerIsMaker { get; set; } /// /// Whether the trade was made at the best match /// + [JsonPropertyName("isBestMatch")] public bool IsBestMatch { get; set; } } @@ -42,11 +44,11 @@ public abstract record BinanceRecentTrade: IBinanceRecentTrade public record BinanceRecentTradeQuote : BinanceRecentTrade { /// - [JsonProperty("quoteQty")] + [JsonPropertyName("quoteQty")] public override decimal QuoteQuantity { get; set; } /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public override decimal BaseQuantity { get; set; } } @@ -56,11 +58,11 @@ public record BinanceRecentTradeQuote : BinanceRecentTrade public record BinanceRecentTradeBase : BinanceRecentTrade { /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public override decimal QuoteQuantity { get; set; } /// - [JsonProperty("baseQty")] + [JsonPropertyName("baseQty")] public override decimal BaseQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceReplaceOrderResult.cs b/Binance.Net/Objects/Models/Spot/BinanceReplaceOrderResult.cs index 0af17a51f..6c105649a 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceReplaceOrderResult.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceReplaceOrderResult.cs @@ -11,19 +11,23 @@ public record BinanceReplaceOrderResult: BinanceReplaceResult /// Cancel result /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("cancelResult")] public OrderOperationResult CancelResult { get; set; } /// /// New order result /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("newOrderResult")] public OrderOperationResult NewOrderResult { get; set; } /// /// Cancel order response. Make sure to check that the CancelResult is Success, else the CancelResponse.Message will contain more info /// + [JsonPropertyName("cancelResponse")] public BinanceReplaceCancelOrder? CancelResponse { get; set; } /// /// New order response. Make sure to check that the NewOrderResult is Success, else the NewOrderResponse.Message will contain more info /// + [JsonPropertyName("newOrderResponse")] public BinanceReplaceOrder? NewOrderResponse { get; set; } } @@ -35,11 +39,12 @@ public record BinanceReplaceOrder: BinancePlacedOrder /// /// Failure message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string? Message { get; set; } /// /// Error code if not successful /// + [JsonPropertyName("code")] public int? Code { get; set; } } @@ -51,11 +56,12 @@ public record BinanceReplaceCancelOrder: BinanceOrderBase /// /// Failure message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string? Message { get; set; } /// /// Error code if not successful /// + [JsonPropertyName("code")] public int? Code { get; set; } } @@ -67,11 +73,12 @@ public record BinanceReplaceResult /// /// Failure message /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string? Message { get; set; } /// /// Error code if not successful /// + [JsonPropertyName("code")] public int? Code { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceSpotAccountSnapshot.cs b/Binance.Net/Objects/Models/Spot/BinanceSpotAccountSnapshot.cs index e07456409..ae8e5f133 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceSpotAccountSnapshot.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceSpotAccountSnapshot.cs @@ -10,17 +10,18 @@ public record BinanceSpotAccountSnapshot /// /// Timestamp of the data /// - [JsonConverter(typeof(DateTimeConverter)), JsonProperty("updateTime")] + [JsonConverter(typeof(DateTimeConverter)), JsonPropertyName("updateTime")] public DateTime Timestamp { get; set; } /// /// Account type the data is for /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("type")] public AccountType Type { get; set; } /// /// Snapshot data /// - [JsonProperty("data")] + [JsonPropertyName("data")] public BinanceSpotAccountSnapshotData Data { get; set; } = default!; } @@ -32,10 +33,12 @@ public record BinanceSpotAccountSnapshotData /// /// The total value of assets in btc /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } /// /// List of balances /// + [JsonPropertyName("balances")] public IEnumerable Balances { get; set; } = Array.Empty(); } diff --git a/Binance.Net/Objects/Models/Spot/BinanceSpotFuturesTransfer.cs b/Binance.Net/Objects/Models/Spot/BinanceSpotFuturesTransfer.cs index ed9262160..31948327e 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceSpotFuturesTransfer.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceSpotFuturesTransfer.cs @@ -11,32 +11,34 @@ public record BinanceSpotFuturesTransfer /// /// The asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// The quantity transferred /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// The transfer direction /// - [JsonConverter(typeof(FuturesTransferTypeConverter))] + [JsonPropertyName("type")] public FuturesTransferType Type { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } - + /// /// The status of the transfer /// - [JsonConverter(typeof(FuturesTransferStatusConverter))] + [JsonPropertyName("status")] public FuturesTransferStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceSymbol.cs b/Binance.Net/Objects/Models/Spot/BinanceSymbol.cs index 97e52da90..175cd1c10 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceSymbol.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceSymbol.cs @@ -11,104 +11,115 @@ public record BinanceSymbol /// /// The symbol /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string Name { get; set; } = string.Empty; /// /// The status of the symbol /// - [JsonConverter(typeof(SymbolStatusConverter))] + [JsonPropertyName("status")] public SymbolStatus Status { get; set; } /// /// The base asset /// + [JsonPropertyName("baseAsset")] public string BaseAsset { get; set; } = string.Empty; /// /// The precision of the base asset /// + [JsonPropertyName("baseAssetPrecision")] public int BaseAssetPrecision { get; set; } /// /// The quote asset /// + [JsonPropertyName("quoteAsset")] public string QuoteAsset { get; set; } = string.Empty; /// /// The precision of the quote asset /// - [JsonProperty("quotePrecision")] + [JsonPropertyName("quotePrecision")] public int QuoteAssetPrecision { get; set; } /// /// Allowed order types /// - [JsonProperty(ItemConverterType = typeof(SpotOrderTypeConverter))] + [JsonPropertyName("orderTypes")] public IEnumerable OrderTypes { get; set; } = Array.Empty(); /// - /// Ice berg orders allowed + /// Iceberg orders allowed /// - public bool IceBergAllowed { get; set; } + [JsonPropertyName("icebergAllowed")] + public bool IcebergAllowed { get; set; } /// /// Cancel replace allowed /// + [JsonPropertyName("cancelReplaceAllowed")] public bool CancelReplaceAllowed { get; set; } /// /// Spot trading orders allowed /// + [JsonPropertyName("isSpotTradingAllowed")] public bool IsSpotTradingAllowed { get; set; } /// /// Trailling stop orders are allowed /// + [JsonPropertyName("allowTrailingStop")] public bool AllowTrailingStop { get; set; } /// /// Margin trading orders allowed /// + [JsonPropertyName("isMarginTradingAllowed")] public bool IsMarginTradingAllowed { get; set; } /// /// If OCO(One Cancels Other) orders are allowed /// + [JsonPropertyName("ocoAllowed")] public bool OCOAllowed { get; set; } /// /// If OTO(One Triggers Other) orders are allowed /// - [JsonProperty("otoAllowed")] + [JsonPropertyName("otoAllowed")] public bool OTOAllowed { get; set; } /// /// Whether or not it is allowed to specify the quantity of a market order in the quote asset /// - [JsonProperty("quoteOrderQtyMarketAllowed")] + [JsonPropertyName("quoteOrderQtyMarketAllowed")] public bool QuoteOrderQuantityMarketAllowed { get; set; } /// /// The precision of the base asset fee /// - [JsonProperty("baseCommissionPrecision")] + [JsonPropertyName("baseCommissionPrecision")] public int BaseFeePrecision { get; set; } /// /// The precision of the quote asset fee /// - [JsonProperty("quoteCommissionPrecision")] + [JsonPropertyName("quoteCommissionPrecision")] public int QuoteFeePrecision { get; set; } /// /// Permissions types /// - [JsonProperty(ItemConverterType = typeof(EnumConverter), ItemConverterParameters = new object[] { false, false })] + [JsonPropertyName("permissions")] public IEnumerable Permissions { get; set; } = Array.Empty(); - - // To be implemented and tested - //[JsonProperty("permissionSets")] - //public IEnumerable> PermissionSets { get; set; } = Array.Empty>(); + /// + /// Permission sets + /// + [JsonPropertyName("permissionSets"), JsonConverter(typeof(AccountTypeConverter))] + public IEnumerable> PermissionSets { get; set; } = Array.Empty>(); /// /// Filters for order on this symbol /// + [JsonPropertyName("filters")] public IEnumerable Filters { get; set; } = Array.Empty(); /// /// Default self trade prevention /// - [JsonProperty("defaultSelfTradePreventionMode")] + [JsonPropertyName("defaultSelfTradePreventionMode")] [JsonConverter(typeof(EnumConverter))] public SelfTradePreventionMode DefaultSelfTradePreventionMode { get; set; } /// /// Allowed self trade prevention modes /// - [JsonProperty("allowedSelfTradePreventionModes", ItemConverterType = typeof(EnumConverter))] + [JsonPropertyName("allowedSelfTradePreventionModes")] public IEnumerable AllowedSelfTradePreventionModes { get; set; } = Array.Empty(); /// /// Filter for max amount of iceberg parts for this symbol diff --git a/Binance.Net/Objects/Models/Spot/BinanceSymbolFilter.cs b/Binance.Net/Objects/Models/Spot/BinanceSymbolFilter.cs index 78dd7ccb4..7f8fce10b 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceSymbolFilter.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceSymbolFilter.cs @@ -12,6 +12,7 @@ public record BinanceSymbolFilter /// /// The type of this filter /// + [JsonPropertyName("filterType")] public SymbolFilterType FilterType { get; set; } } @@ -47,10 +48,15 @@ public record BinanceSymbolPercentPriceFilter : BinanceSymbolFilter /// The max factor the price can deviate down /// public decimal MultiplierDown { get; set; } + /// /// The amount of minutes the average price of trades is calculated over. 0 means the last price is used /// - public int AveragePriceMinutes { get; set; } + public int? MultiplierDecimal { get; set; } + /// + /// The amount of minutes the average price of trades is calculated over. 0 means the last price is used + /// + public int? AveragePriceMinutes { get; set; } } /// @@ -131,12 +137,12 @@ public record BinanceSymbolMinNotionalFilter : BinanceSymbolFilter /// /// Whether or not this filter is applied to market orders. If so the average trade price is used. /// - public bool ApplyToMarketOrders { get; set; } + public bool? ApplyToMarketOrders { get; set; } /// /// The amount of minutes the average price of trades is calculated over for market orders. 0 means the last price is used /// - public int AveragePriceMinutes { get; set; } + public int? AveragePriceMinutes { get; set; } } /// diff --git a/Binance.Net/Objects/Models/Spot/BinanceSystemStatus.cs b/Binance.Net/Objects/Models/Spot/BinanceSystemStatus.cs index 5f93688f0..827fa72aa 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceSystemStatus.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceSystemStatus.cs @@ -11,12 +11,12 @@ public record BinanceSystemStatus /// /// Status /// - [JsonConverter(typeof(SystemStatusConverter))] + [JsonPropertyName("status")] public SystemStatus Status { get; set; } /// /// Additional info /// - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string? Message { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceTestOrderCommission.cs b/Binance.Net/Objects/Models/Spot/BinanceTestOrderCommission.cs index 2336e2db1..1bd0ca688 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceTestOrderCommission.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceTestOrderCommission.cs @@ -8,17 +8,17 @@ public record BinanceTestOrderCommission /// /// Standard fee rates on trades from the order /// - [JsonProperty("standardCommissionForOrder")] + [JsonPropertyName("standardCommissionForOrder")] public BinanceFee StandardFeeForOrder { get; set; } = null!; /// /// Tax fee rates on trades from the order /// - [JsonProperty("taxCommissionForOrder")] + [JsonPropertyName("taxCommissionForOrder")] public BinanceFee TaxFeeForOrder { get; set; } = null!; /// /// Discount info /// - [JsonProperty("discount")] + [JsonPropertyName("discount")] public BinanceDiscount Discount { get; set; } = null!; } @@ -30,12 +30,12 @@ public record BinanceFee /// /// Maker fee /// - [JsonProperty("maker")] + [JsonPropertyName("maker")] public decimal Maker { get; set; } /// /// Taker fee /// - [JsonProperty("taker")] + [JsonPropertyName("taker")] public decimal Taker { get; set; } } @@ -47,22 +47,22 @@ public record BinanceDiscount /// /// Is discount enabled for the account /// - [JsonProperty("enabledForAccount")] + [JsonPropertyName("enabledForAccount")] public bool EnabledForAccount { get; set; } /// /// Is discount enabled for the symbol /// - [JsonProperty("enabledForSymbol")] + [JsonPropertyName("enabledForSymbol")] public bool EnabledForSymbol { get; set; } /// /// The discount asset /// - [JsonProperty("discountAsset")] + [JsonPropertyName("discountAsset")] public string DiscountAsset { get; set; } = string.Empty; /// /// Discount rate /// - [JsonProperty("discount")] + [JsonPropertyName("discount")] public decimal Discount { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceTrade.cs b/Binance.Net/Objects/Models/Spot/BinanceTrade.cs index 0ad67ca2e..a230fc73f 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceTrade.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceTrade.cs @@ -8,65 +8,74 @@ public record BinanceTrade /// /// The symbol the trade is for /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The id of the trade /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// The order id the trade belongs to /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// Id of the order list this order belongs to /// + [JsonPropertyName("orderListId")] public long? OrderListId { get; set; } - + /// /// The price of the trade /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// The quantity of the trade /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// The quote quantity of the trade /// - [JsonProperty("quoteQty")] + [JsonPropertyName("quoteQty")] public decimal QuoteQuantity { get; set; } /// /// The fee paid for the trade /// - [JsonProperty("commission")] + [JsonPropertyName("commission")] public decimal Fee { get; set; } /// /// The asset the fee is paid in /// - [JsonProperty("commissionAsset")] + [JsonPropertyName("commissionAsset")] public string FeeAsset { get; set; } = string.Empty; /// /// The time the trade was made /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Whether account was the buyer in the trade /// + [JsonPropertyName("isBuyer")] public bool IsBuyer { get; set; } /// /// Whether account was the maker in the trade /// + [JsonPropertyName("isMaker")] public bool IsMaker { get; set; } /// /// Whether trade was made with the best match /// + [JsonPropertyName("isBestMatch")] public bool IsBestMatch { get; set; } /// /// If isolated margin (for margin account orders) /// + [JsonPropertyName("isIsolated")] public bool? IsIsolated { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceTradeFee.cs b/Binance.Net/Objects/Models/Spot/BinanceTradeFee.cs index dba7be8ef..64e8c481d 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceTradeFee.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceTradeFee.cs @@ -8,16 +8,17 @@ public record BinanceTradeFee /// /// The symbol this fee is for /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The fee for trades where you're the maker /// - [JsonProperty("makerCommission")] + [JsonPropertyName("makerCommission")] public decimal MakerFee { get; set; } /// /// The fee for trades where you're the taker /// - [JsonProperty("takerCommission")] + [JsonPropertyName("takerCommission")] public decimal TakerFee { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceTradingDayTicker.cs b/Binance.Net/Objects/Models/Spot/BinanceTradingDayTicker.cs index e81f2314f..e79fb7923 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceTradingDayTicker.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceTradingDayTicker.cs @@ -8,68 +8,79 @@ public record BinanceTradingDayTicker /// /// The symbol the price is for /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// The actual price change in the last 24 hours /// + [JsonPropertyName("priceChange")] public decimal PriceChange { get; set; } /// /// The price change in percentage in the last 24 hours /// + [JsonPropertyName("priceChangePercent")] public decimal PriceChangePercent { get; set; } /// /// The weighted average price in the last 24 hours /// - [JsonProperty("weightedAvgPrice")] + [JsonPropertyName("weightedAvgPrice")] public decimal WeightedAveragePrice { get; set; } /// /// The most recent trade price /// + [JsonPropertyName("lastPrice")] public decimal LastPrice { get; set; } /// /// The open price 24 hours ago /// + [JsonPropertyName("openPrice")] public decimal OpenPrice { get; set; } /// /// The highest price in the last 24 hours /// + [JsonPropertyName("highPrice")] public decimal HighPrice { get; set; } /// /// The lowest price in the last 24 hours /// + [JsonPropertyName("lowPrice")] public decimal LowPrice { get; set; } /// /// Volume in base asset /// + [JsonPropertyName("volume")] public decimal Volume { get; set; } /// /// Volume in quote asset /// + [JsonPropertyName("quoteVolume")] public decimal QuoteVolume { get; set; } /// /// Time at which this stats opened /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("openTime")] public DateTime OpenTime { get; set; } /// /// Time at which this stats closed /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("closeTime")] public DateTime CloseTime { get; set; } /// /// The first trade ID in the last 24 hours /// - [JsonProperty("firstId")] + [JsonPropertyName("firstId")] public long FirstTradeId { get; set; } /// /// The last trade ID in the last 24 hours /// - [JsonProperty("lastId")] + [JsonPropertyName("lastId")] public long LastTradeId { get; set; } /// /// The amount of trades made in the last 24 hours /// - [JsonProperty("count")] + [JsonPropertyName("count")] public long TotalTrades { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceTradingStatus.cs b/Binance.Net/Objects/Models/Spot/BinanceTradingStatus.cs index 352b5f36e..29e038f66 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceTradingStatus.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceTradingStatus.cs @@ -10,26 +10,30 @@ public record BinanceTradingStatus /// /// Is locked /// + [JsonPropertyName("isLocked")] public bool IsLocked { get; set; } /// /// Planned time of recovery /// + [JsonPropertyName("plannedRecoverTime")] public int PlannedRecoverTime { get; set; } /// /// Conditions /// - [JsonProperty("triggerCondition")] + [JsonPropertyName("triggerCondition")] public Dictionary TriggerConditions { get; set; } = new Dictionary(); /// /// Dictionary of indicator lists for symbols /// + [JsonPropertyName("indicators")] public Dictionary> Indicators { get; set; } = new Dictionary>(); /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } @@ -41,23 +45,23 @@ public record BinanceIndicator /// /// Indicator name /// - [JsonProperty("i")] + [JsonPropertyName("i")] public IndicatorType IndicatorType { get; set; } /// /// Count /// - [JsonProperty("c")] + [JsonPropertyName("c")] public int Count { get; set; } /// /// Current value /// - [JsonProperty("v")] + [JsonPropertyName("v")] public decimal CurrentValue { get; set; } /// /// Trigger value /// - [JsonProperty("t")] + [JsonPropertyName("t")] public decimal TriggerValue { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceTransfer.cs b/Binance.Net/Objects/Models/Spot/BinanceTransfer.cs index b5a68efbe..6f8ff1238 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceTransfer.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceTransfer.cs @@ -11,30 +11,33 @@ public record BinanceTransfer /// /// The asset which was transfered /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Quantity transfered /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Transfer type /// - [JsonConverter(typeof(UniversalTransferTypeConverter))] + [JsonPropertyName("type")] public UniversalTransferType Type { get; set; } /// /// Status /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long Id { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceUserAsset.cs b/Binance.Net/Objects/Models/Spot/BinanceUserAsset.cs index b72d19901..22bdfe6fb 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceUserAsset.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceUserAsset.cs @@ -8,60 +8,72 @@ public record BinanceUserAsset /// /// Asset code /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Deposit all is enabled /// + [JsonPropertyName("depositAllEnable")] public bool DepositAllEnable { get; set; } /// /// Quantity free /// - [JsonProperty("free")] + [JsonPropertyName("free")] public decimal Available { get; set; } /// /// Quantity frozen /// + [JsonPropertyName("freeze")] public decimal Freeze { get; set; } /// /// Ipo-able /// + [JsonPropertyName("ipoable")] public decimal Ipoable { get; set; } /// /// Ipo-ing /// + [JsonPropertyName("ipoing")] public decimal Ipoing { get; set; } /// /// Is the asset legally money /// + [JsonPropertyName("isLegalMoney")] public bool IsLegalMoney { get; set; } /// /// Quantity locked /// + [JsonPropertyName("locked")] public decimal Locked { get; set; } /// /// Storage /// + [JsonPropertyName("storage")] public decimal Storage { get; set; } /// /// Is trading /// + [JsonPropertyName("trading")] public bool Trading { get; set; } /// /// Withdraw all enabled /// + [JsonPropertyName("withdrawAllEnable")] public bool WithdrawAllEnable { get; set; } /// /// Name of the asset /// + [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; /// /// Currently withdrawing /// + [JsonPropertyName("withdrawing")] public decimal Withdrawing { get; set; } /// /// Networks /// + [JsonPropertyName("networkList")] public IEnumerable NetworkList { get; set; } = Array.Empty(); } @@ -73,91 +85,103 @@ public record BinanceNetwork /// /// Regex for an address on the network /// + [JsonPropertyName("addressRegex")] public string AddressRegex { get; set; } = string.Empty; /// /// Asset name /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Deposit description /// - [JsonProperty("depositDesc")] + [JsonPropertyName("depositDesc")] public string DepositDescription { get; set; } = string.Empty; /// /// Deposit enabled /// - [JsonProperty("depositEnable")] + [JsonPropertyName("depositEnable")] public bool DepositEnabled { get; set; } /// /// Is default network /// + [JsonPropertyName("isDefault")] public bool IsDefault { get; set; } /// /// Regex for a memo /// + [JsonPropertyName("memoRegex")] public string MemoRegex { get; set; } = string.Empty; /// /// Minimal confirmations for balance confirmation /// - [JsonProperty("minConfirm")] + [JsonPropertyName("minConfirm")] public int MinConfirmations { get; set; } /// /// Name /// + [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; /// /// Network /// + [JsonPropertyName("network")] public string Network { get; set; } = string.Empty; /// /// Tips /// + [JsonPropertyName("specialTips")] public string SpecialTips { get; set; } = string.Empty; /// /// Confirmation number for balance unlock /// + [JsonPropertyName("unLockConfirm")] public int UnlockConfirm { get; set; } /// /// Withdraw description /// - [JsonProperty("withdrawDesc")] + [JsonPropertyName("withdrawDesc")] public string WithdrawDescription { get; set; } = string.Empty; /// /// Withdraw is enabled /// - [JsonProperty("withdrawEnable")] + [JsonPropertyName("withdrawEnable")] public bool WithdrawEnabled { get; set; } /// /// Fee for withdrawing /// + [JsonPropertyName("withdrawFee")] public decimal WithdrawFee { get; set; } /// /// Minimal withdraw quantity /// + [JsonPropertyName("withdrawMin")] public decimal WithdrawMin { get; set; } /// /// Min withdraw step /// + [JsonPropertyName("withdrawIntegerMultiple")] public decimal WithdrawIntegerMultiple { get; set; } /// /// Max withdraw quantity /// + [JsonPropertyName("withdrawMax")] public decimal WithdrawMax { get; set; } /// /// If the asset needs to provide memo to withdraw /// + [JsonPropertyName("sameAddress")] public bool SameAddress { get; set; } /// /// Estimated arrival time /// - [JsonProperty("estimatedArrivalTime")] + [JsonPropertyName("estimatedArrivalTime")] public int? EstimatedArrivalTime { get; set; } /// /// Whether the network is busy /// - [JsonProperty("busy")] + [JsonPropertyName("busy")] public bool Busy { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceUserBalance.cs b/Binance.Net/Objects/Models/Spot/BinanceUserBalance.cs index c1f942529..71509dace 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceUserBalance.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceUserBalance.cs @@ -8,18 +8,22 @@ public record BinanceUserBalance : BinanceBalance /// /// Frozen /// + [JsonPropertyName("freeze")] public decimal Freeze { get; set; } /// /// Currently withdrawing /// + [JsonPropertyName("withdrawing")] public decimal Withdrawing { get; set; } /// /// Ipoable amount /// + [JsonPropertyName("ipoable")] public decimal Ipoable { get; set; } /// /// Value in btc /// + [JsonPropertyName("btcValuation")] public decimal BtcValuation { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceVipLevelAndStatus.cs b/Binance.Net/Objects/Models/Spot/BinanceVipLevelAndStatus.cs index 8b3b97e4f..df7560c29 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceVipLevelAndStatus.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceVipLevelAndStatus.cs @@ -8,17 +8,17 @@ public record BinanceVipLevelAndStatus /// /// VIP level /// - [JsonProperty("vipLevel")] + [JsonPropertyName("vipLevel")] public int VipLevel { get; set; } /// /// Is margin enabled /// - [JsonProperty("isMarginEnabled")] + [JsonPropertyName("isMarginEnabled")] public bool IsMarginEnabled { get; set; } /// /// Is futures enabled /// - [JsonProperty("isFutureEnabled")] + [JsonPropertyName("isFutureEnabled")] public bool IsFuturesEnabled { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceWalletBalance.cs b/Binance.Net/Objects/Models/Spot/BinanceWalletBalance.cs index 5c83a1fc8..50b7ead4f 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceWalletBalance.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceWalletBalance.cs @@ -8,17 +8,17 @@ public record BinanceWalletBalance /// /// Is the wallet activated /// - [JsonProperty("activate")] + [JsonPropertyName("activate")] public bool Active { get; set; } /// /// Balance /// - [JsonProperty("balance")] + [JsonPropertyName("balance")] public decimal Balance { get; set; } /// /// Name of the wallet /// - [JsonProperty("walletName")] + [JsonPropertyName("walletName")] public string WalletName { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceWithdrawal.cs b/Binance.Net/Objects/Models/Spot/BinanceWithdrawal.cs index 0f961f418..a4f845a05 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceWithdrawal.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceWithdrawal.cs @@ -11,84 +11,91 @@ public record BinanceWithdrawal /// /// The id of the withdrawal /// + [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; /// /// Withdraw order id /// + [JsonPropertyName("withdrawOrderId")] public string? WithdrawOrderId { get; set; } /// /// The time the withdrawal was applied for /// + [JsonPropertyName("applyTime")] public DateTime ApplyTime { get; set; } /// /// The quantity of the withdrawal /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// The address the asset was withdrawn to /// + [JsonPropertyName("address")] public string Address { get; set; } = string.Empty; /// /// Tag for the address /// + [JsonPropertyName("addressTag")] public string AddressTag { get; set; } = string.Empty; /// /// The transaction id of the withdrawal /// - [JsonProperty("txId")] + [JsonPropertyName("txId")] public string TransactionId { get; set; } = string.Empty; /// /// Transaction fee for the withdrawal /// + [JsonPropertyName("transactionFee")] public decimal TransactionFee { get; set; } /// /// The asset that was withdrawn /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Network that was used /// + [JsonPropertyName("network")] public string Network { get; set; } = string.Empty; /// /// Confirm times for withdraw /// - [JsonProperty("confirmNo")] + [JsonPropertyName("confirmNo")] public int? ConfirmTimes { get; set; } /// /// The status of the withdrawal /// - [JsonConverter(typeof(WithdrawalStatusConverter))] + [JsonPropertyName("status")] public WithdrawalStatus Status { get; set; } /// /// Transfer type: 1 for internal transfer, 0 for external transfer /// - [JsonConverter(typeof(WithdrawDepositTransferTypeConverter))] + [JsonPropertyName("transferType")] public WithdrawDepositTransferType TransferType { get; set; } /// /// Transaction key /// - [JsonProperty("txKey")] + [JsonPropertyName("txKey")] public string TransactionKey { get; set; } = string.Empty; /// /// Info /// - [JsonProperty("info")] + [JsonPropertyName("info")] public string Info { get; set; } = string.Empty; /// /// The wallet type the withdrawal was from /// [JsonConverter(typeof(EnumConverter))] - [JsonProperty("walletType")] + [JsonPropertyName("walletType")] public WalletType WalletType { get; set; } /// /// The time the withdrawal was completed /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("completeTime")] + [JsonPropertyName("completeTime")] public DateTime? CompleteTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceWithdrawalAddress.cs b/Binance.Net/Objects/Models/Spot/BinanceWithdrawalAddress.cs index 8b9e6062b..d527d65d4 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceWithdrawalAddress.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceWithdrawalAddress.cs @@ -8,42 +8,42 @@ public record BinanceWithdrawalAddress /// /// Address /// - [JsonProperty("address")] + [JsonPropertyName("address")] public string Address { get; set; } = string.Empty; /// /// Address tag /// - [JsonProperty("addressTag")] + [JsonPropertyName("addressTag")] public string? AddressTag { get; set; } /// /// Asset /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Name /// - [JsonProperty("name")] + [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; /// /// Network /// - [JsonProperty("network")] + [JsonPropertyName("network")] public string Network { get; set; } = string.Empty; /// /// Origin /// - [JsonProperty("origin")] + [JsonPropertyName("origin")] public string? Origin { get; set; } /// /// Origin type /// - [JsonProperty("originType")] + [JsonPropertyName("originType")] public string OriginType { get; set; } = string.Empty; /// /// Is whitelisted /// - [JsonProperty("whiteStatus")] + [JsonPropertyName("whiteStatus")] public bool Whitelisted { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceWithdrawalFee.cs b/Binance.Net/Objects/Models/Spot/BinanceWithdrawalFee.cs index 52ea83efd..cdab455c2 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceWithdrawalFee.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceWithdrawalFee.cs @@ -8,23 +8,27 @@ public record BinanceAssetDetails /// /// Minimal quantity you can withdraw /// - [JsonProperty("minWithdrawAmount")] + [JsonPropertyName("minWithdrawAmount")] public decimal MinimalWithdrawQuantity { get; set; } /// /// Whether deposits are enabled /// + [JsonPropertyName("depositStatus")] public bool DepositStatus { get; set; } /// /// Whether withdrawing is enabled /// + [JsonPropertyName("withdrawStatus")] public bool WithdrawStatus { get; set; } /// /// Fee for withdrawing /// + [JsonPropertyName("withdrawFee")] public decimal WithdrawFee { get; set; } /// /// Status string for deposit /// + [JsonPropertyName("depositTip")] public string? DepositTip { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/BinanceWithdrawalPlaced.cs b/Binance.Net/Objects/Models/Spot/BinanceWithdrawalPlaced.cs index 523d55118..8c03bb43b 100644 --- a/Binance.Net/Objects/Models/Spot/BinanceWithdrawalPlaced.cs +++ b/Binance.Net/Objects/Models/Spot/BinanceWithdrawalPlaced.cs @@ -8,6 +8,7 @@ public record BinanceWithdrawalPlaced /// /// The id /// + [JsonPropertyName("id")] public string? Id { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfo.cs b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfo.cs index 8b201b8b9..7ae072e00 100644 --- a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfo.cs +++ b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfo.cs @@ -8,68 +8,81 @@ public record BinanceBlvtInfo /// /// Name of the token /// + [JsonPropertyName("tokenName")] public string TokenName { get; set; } = string.Empty; /// /// Description of the token /// + [JsonPropertyName("description")] public string Description { get; set; } = string.Empty; /// /// Underlying asset /// + [JsonPropertyName("underlying")] public string Underlying { get; set; } = string.Empty; /// /// Token issued /// + [JsonPropertyName("tokenIssued")] public decimal TokenIssued { get; set; } /// /// Basket /// + [JsonPropertyName("basket")] public string Basket { get; set; } = string.Empty; /// /// Nav /// + [JsonPropertyName("nav")] public decimal Nav { get; set; } /// /// Real leverage /// + [JsonPropertyName("realLeverage")] public decimal RealLeverage { get; set; } /// /// Funding rate /// + [JsonPropertyName("fundingRate")] public decimal FundingRate { get; set; } /// /// Daily management fee /// + [JsonPropertyName("dailyManagementFee")] public decimal DailyManagementFee { get; set; } /// /// Current baskets /// + [JsonPropertyName("currentBaskets")] public IEnumerable CurrentBaskets { get; set; } = Array.Empty(); /// /// Redeem fee percentage /// - [JsonProperty("redeemFeePct")] + [JsonPropertyName("redeemFeePct")] public decimal RedeemFeePercentage { get; set; } /// /// Daily redeem limit /// + [JsonPropertyName("dailyRedeemLimit")] public decimal DailyRedeemLimit { get; set; } /// /// Purchase fee percentage /// - [JsonProperty("purchaseFeePct")] + [JsonPropertyName("purchaseFeePct")] public decimal PurchaseFeePercentage { get; set; } /// /// Daily purchase limit /// + [JsonPropertyName("dailyPurchaseLimit")] public decimal DailyPurchaseLimit { get; set; } /// /// Data timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } @@ -81,15 +94,17 @@ public record BlvtCurrentBasket /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Notional value /// + [JsonPropertyName("notionalValue")] public decimal NotionalValue { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfoUpdate.cs b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfoUpdate.cs index c3cec0cd1..4c914ee09 100644 --- a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfoUpdate.cs +++ b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtInfoUpdate.cs @@ -8,38 +8,38 @@ public record BinanceBlvtInfoUpdate: BinanceStreamEvent /// /// Token name /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string TokenName { get; set; } = string.Empty; /// /// Token issued /// - [JsonProperty("m")] + [JsonPropertyName("m")] public decimal TokenIssued { get; set; } /// /// Nav /// - [JsonProperty("n")] + [JsonPropertyName("n")] public decimal Nav { get; set; } /// /// Baskets /// - [JsonProperty("b")] + [JsonPropertyName("b")] public IEnumerable Baskets { get; set; } = Array.Empty(); /// /// Token issued /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal RealLeverage { get; set; } /// /// Token issued /// - [JsonProperty("t")] + [JsonPropertyName("t")] public decimal TargetLeverage { get; set; } /// /// Funding ratio /// - [JsonProperty("f")] + [JsonPropertyName("f")] public decimal FundingRatio { get; set; } } @@ -51,12 +51,12 @@ public record BlvtBasket /// /// Symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Position /// - [JsonProperty("n")] + [JsonPropertyName("n")] public decimal Position { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedeemResult.cs b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedeemResult.cs index d5714255e..bb1010678 100644 --- a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedeemResult.cs +++ b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedeemResult.cs @@ -11,30 +11,33 @@ public record BinanceBlvtRedeemResult /// /// Id /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// Status /// - [JsonConverter(typeof(BlvtStatusConverter))] + [JsonPropertyName("status")] public BlvtStatus Status { get; set; } /// /// Name of the token /// + [JsonPropertyName("tokenName")] public string TokenName { get; set; } = string.Empty; /// /// Redemption value in usdt /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Redemption token quantity /// - [JsonProperty("redeemAmount")] + [JsonPropertyName("redeemAmount")] public decimal RedeemQuantity { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedemption.cs b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedemption.cs index f5c9eca55..f4b96aa31 100644 --- a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedemption.cs +++ b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtRedemption.cs @@ -8,33 +8,39 @@ public record BinanceBlvtRedemption /// /// Id /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// Token name /// + [JsonPropertyName("tokenName")] public string TokenName { get; set; } = string.Empty; /// /// Redemption quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// NAV price of redemption /// + [JsonPropertyName("nav")] public decimal Nav { get; set; } /// /// Redemption fee in usdt /// + [JsonPropertyName("fee")] public decimal Fee { get; set; } /// /// Net redemption value in usdt /// + [JsonPropertyName("netProceed")] public decimal NetProceed { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscribeResult.cs b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscribeResult.cs index 554aeb584..69064c56a 100644 --- a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscribeResult.cs +++ b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscribeResult.cs @@ -11,29 +11,33 @@ public record BinanceBlvtSubscribeResult /// /// Id /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// Status /// - [JsonConverter(typeof(BlvtStatusConverter))] + [JsonPropertyName("status")] public BlvtStatus Status { get; set; } /// /// Name of the token /// + [JsonPropertyName("tokenName")] public string TokenName { get; set; } = string.Empty; /// /// Subscribed token quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Subscription cost in usdt /// + [JsonPropertyName("cost")] public decimal Cost { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscription.cs b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscription.cs index d20e105a5..09c35731c 100644 --- a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscription.cs +++ b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtSubscription.cs @@ -8,33 +8,39 @@ public record BinanceBlvtSubscription /// /// Id /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// Token name /// + [JsonPropertyName("tokenName")] public string TokenName { get; set; } = string.Empty; /// /// Subscription quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// NAV price of subscription /// + [JsonPropertyName("nav")] public decimal Nav { get; set; } /// /// Subscription fee in usdt /// + [JsonPropertyName("fee")] public decimal Fee { get; set; } /// /// Subscription cost in usdt /// + [JsonPropertyName("totalCharge")] public decimal TotalCharge { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtUserLimit.cs b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtUserLimit.cs index 97697d2e0..97291dc06 100644 --- a/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtUserLimit.cs +++ b/Binance.Net/Objects/Models/Spot/Blvt/BinanceBlvtUserLimit.cs @@ -8,14 +8,17 @@ public record BinanceBlvtUserLimit /// /// Token name /// + [JsonPropertyName("tokenName")] public string TokenName { get; set; } = string.Empty; /// /// Daily purchase limit /// + [JsonPropertyName("userDailyTotalPurchaseLimit")] public decimal UserDailyTotalPurchaseLimit { get; set; } /// /// Daily redeem limit /// + [JsonPropertyName("userDailyTotalRedeemLimit")] public decimal UserDailyTotalRedeemLimit { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAccountInfo.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAccountInfo.cs index 730f1c9bd..1d02d4580 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAccountInfo.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAccountInfo.cs @@ -8,33 +8,37 @@ public record BinanceBrokerageAccountInfo /// /// Max Maker Commission /// + [JsonPropertyName("maxMakerCommission")] public decimal MaxMakerCommission { get; set; } - + /// /// Min Maker Commission /// + [JsonPropertyName("minMakerCommission")] public decimal MinMakerCommission { get; set; } - + /// /// Max Taker Commission /// + [JsonPropertyName("maxTakerCommission")] public decimal MaxTakerCommission { get; set; } - + /// /// Min Taker Commission /// + [JsonPropertyName("minTakerCommission")] public decimal MinTakerCommission { get; set; } - + /// /// Sub Account Quantity /// - [JsonProperty("subAccountQty")] + [JsonPropertyName("subAccountQty")] public int SubAccountQuantity { get; set; } /// /// Max Sub Account Quantity /// - [JsonProperty("maxSubAccountQty")] + [JsonPropertyName("maxSubAccountQty")] public int MaxSubAccountQuantity { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAddIpRestrictionResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAddIpRestrictionResult.cs index f8bff9ce9..b07e12130 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAddIpRestrictionResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageAddIpRestrictionResult.cs @@ -8,22 +8,25 @@ public record BinanceBrokerageAddIpRestrictionResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; /// /// Api key /// + [JsonPropertyName("apikey")] public string ApiKey { get; set; } = string.Empty; /// /// IP /// + [JsonPropertyName("ip")] public string Ip { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("updateTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateDate { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageApiKeyCreateResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageApiKeyCreateResult.cs index 81c948a83..52d9c4481 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageApiKeyCreateResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageApiKeyCreateResult.cs @@ -8,35 +8,37 @@ public record BinanceBrokerageApiKeyCreateResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Api Key /// + [JsonPropertyName("apiKey")] public string ApiKey { get; set; } = string.Empty; - + /// /// Api Secret /// - [JsonProperty("secretKey")] + [JsonPropertyName("secretKey")] public string ApiSecret { get; set; } = string.Empty; /// /// Is Spot Trading Enabled /// - [JsonProperty("canTrade")] + [JsonPropertyName("canTrade")] public bool IsSpotTradingEnabled { get; set; } /// /// Is Margin Trading Enabled /// - [JsonProperty("marginTrade")] + [JsonPropertyName("marginTrade")] public bool IsMarginTradingEnabled { get; set; } /// /// Is Futures Trading Enabled /// - [JsonProperty("futuresTrade")] + [JsonPropertyName("futuresTrade")] public bool IsFuturesTradingEnabled { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageBnbBurnStatus.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageBnbBurnStatus.cs index a7ca778cc..9e01b7acd 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageBnbBurnStatus.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageBnbBurnStatus.cs @@ -8,18 +8,19 @@ public record BinanceBrokerageBnbBurnStatus /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Is Spot BNB Burn /// - [JsonProperty("spotBNBBurn")] + [JsonPropertyName("spotBNBBurn")] public bool IsSpotBnbBurn { get; set; } /// /// Is Interest BNB Burn /// - [JsonProperty("interestBNBBurn")] + [JsonPropertyName("interestBNBBurn")] public bool IsInterestBnbBurn { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnMarginInterestResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnMarginInterestResult.cs index 90a2e6e15..60f9d31d2 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnMarginInterestResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnMarginInterestResult.cs @@ -8,12 +8,13 @@ public record BinanceBrokerageChangeBnbBurnMarginInterestResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Is Interest BNB Burn /// - [JsonProperty("interestBNBBurn")] + [JsonPropertyName("interestBNBBurn")] public bool IsInterestBnbBurn { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnSpotAndMarginResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnSpotAndMarginResult.cs index e85a9ee9c..3b18e597c 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnSpotAndMarginResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageChangeBnbBurnSpotAndMarginResult.cs @@ -8,12 +8,13 @@ public record BinanceBrokerageChangeBnbBurnSpotAndMarginResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Is Spot BNB Burn /// - [JsonProperty("spotBNBBurn")] + [JsonPropertyName("spotBNBBurn")] public bool IsSpotBnbBurn { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableFuturesResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableFuturesResult.cs index fba89f40b..02d23da03 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableFuturesResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableFuturesResult.cs @@ -8,18 +8,19 @@ public record BinanceBrokerageEnableFuturesResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Is Futures Enabled /// - [JsonProperty("enableFutures")] + [JsonPropertyName("enableFutures")] public bool IsFuturesEnabled { get; set; } /// /// Update Date /// - [JsonProperty("updateTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateDate { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableLeverageTokenResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableLeverageTokenResult.cs index 6b47dd645..a6bd15c3c 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableLeverageTokenResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableLeverageTokenResult.cs @@ -8,12 +8,13 @@ public record BinanceBrokerageEnableLeverageTokenResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Is Leverage Token Enabled /// - [JsonProperty("enableBlvt")] + [JsonPropertyName("enableBlvt")] public bool IsLeverageTokenEnabled { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableMarginResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableMarginResult.cs index b11318bee..6f981b1ae 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableMarginResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageEnableMarginResult.cs @@ -8,18 +8,19 @@ public record BinanceBrokerageEnableMarginResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Is Margin Enabled /// - [JsonProperty("enableMargin")] + [JsonPropertyName("enableMargin")] public bool IsMarginEnabled { get; set; } /// /// Update Date /// - [JsonProperty("updateTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateDate { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesAssetInfo.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesAssetInfo.cs index cd62435a6..90daf05ee 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesAssetInfo.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesAssetInfo.cs @@ -8,12 +8,14 @@ public record BinanceBrokerageFuturesAssetInfo /// /// Data /// + [JsonPropertyName("data")] public IEnumerable Data { get; set; } = Array.Empty(); /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } @@ -25,47 +27,55 @@ public record BinanceBrokerageSubAccountFuturesAssetInfo /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Futures enable /// - [JsonProperty("futuresEnable")] + [JsonPropertyName("futuresEnable")] public bool IsFuturesEnable { get; set; } /// /// Total Initial Margin Of Usdt /// + [JsonPropertyName("totalInitialMarginOfUsdt")] public decimal TotalInitialMarginOfUsdt { get; set; } - + /// /// Total Maintenance Margin Of Usdt /// + [JsonPropertyName("totalMaintenanceMarginOfUsdt")] public decimal TotalMaintenanceMarginOfUsdt { get; set; } /// /// Total Wallet Balance Of Usdt /// + [JsonPropertyName("totalWalletBalanceOfUsdt")] public decimal TotalWalletBalanceOfUsdt { get; set; } /// /// Total Unrealized Profit Of Usdt /// + [JsonPropertyName("totalUnrealizedProfitOfUsdt")] public decimal TotalUnrealizedProfitOfUsdt { get; set; } /// /// Total Margin Balance Of Usdt /// + [JsonPropertyName("totalMarginBalanceOfUsdt")] public decimal TotalMarginBalanceOfUsdt { get; set; } /// /// Total Position Initial Margin Of Usdt /// + [JsonPropertyName("totalPositionInitialMarginOfUsdt")] public decimal TotalPositionInitialMarginOfUsdt { get; set; } /// /// Total Open Order Initial Margin Of Usdt /// + [JsonPropertyName("totalOpenOrderInitialMarginOfUsdt")] public decimal TotalOpenOrderInitialMarginOfUsdt { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesRebate.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesRebate.cs index bbbd0d1a7..6b2569843 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesRebate.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesRebate.cs @@ -8,32 +8,37 @@ public record BinanceBrokerageFuturesRebate /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; /// /// Income /// + [JsonPropertyName("income")] public decimal Income { get; set; } - + /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; - + /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; - + /// /// TradeId /// + [JsonPropertyName("tradeId")] public long TradeId { get; set; } - + /// /// Date /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Date { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesType.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesType.cs deleted file mode 100644 index 2efa14b6a..000000000 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageFuturesType.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Brokerage.SubAccountData -{ - /// - /// Futures type - /// - public enum BinanceBrokerageFuturesType - { - /// - /// USDT-Ⓜ Futures - /// - USDT = 1, - - /// - /// COIN-Ⓜ Futures - /// - COIN = 2, - } -} \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageIpRestriction.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageIpRestriction.cs index ef0f752a8..8969d3450 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageIpRestriction.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageIpRestriction.cs @@ -8,22 +8,25 @@ public record BinanceBrokerageIpRestrictionBase /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; /// /// Api key /// + [JsonPropertyName("apikey")] public string ApiKey { get; set; } = string.Empty; /// /// IP list /// + [JsonPropertyName("ipList")] public IEnumerable IpList { get; set; } = Array.Empty(); /// /// Timestamp /// - [JsonProperty("updateTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateDate { get; set; } } @@ -35,6 +38,7 @@ public record BinanceBrokerageIpRestriction : BinanceBrokerageIpRestrictionBase /// /// Ip Restrict /// + [JsonPropertyName("ipRestrict")] public bool IpRestrict { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageMarginAssetInfo.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageMarginAssetInfo.cs index ca925f4ac..66737df59 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageMarginAssetInfo.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageMarginAssetInfo.cs @@ -8,12 +8,14 @@ public record BinanceBrokerageMarginAssetInfo /// /// Data /// + [JsonPropertyName("data")] public IEnumerable Data { get; set; } = Array.Empty(); /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } @@ -25,32 +27,37 @@ public record BinanceBrokerageSubAccountMarginAssetInfo /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Margin enable /// - [JsonProperty("marginEnable")] + [JsonPropertyName("marginEnable")] public bool IsMarginEnable { get; set; } /// /// Total Asset Of Btc /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } - + /// /// Total Liability Of Btc /// + [JsonPropertyName("totalLiabilityBtc")] public decimal TotalLiabilityOfBtc { get; set; } - + /// /// Total Net Asset Of Btc /// + [JsonPropertyName("totalNetAssetOfBtc")] public decimal TotalNetAssetOfBtc { get; set; } - + /// /// Margin level /// + [JsonPropertyName("marginLevel")] public decimal MarginLevel { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageRebate.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageRebate.cs index 56e897518..4206df5e2 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageRebate.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageRebate.cs @@ -8,32 +8,37 @@ public record BinanceBrokerageRebate /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; /// /// Income /// + [JsonPropertyName("income")] public decimal Income { get; set; } - + /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Trade Id /// + [JsonPropertyName("tradeId")] public string TradeId { get; set; } = string.Empty; /// /// Date /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Date { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSpotAssetInfo.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSpotAssetInfo.cs index e4f2ba742..5ad252f51 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSpotAssetInfo.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSpotAssetInfo.cs @@ -8,12 +8,14 @@ public record BinanceBrokerageSpotAssetInfo /// /// Data /// + [JsonPropertyName("data")] public IEnumerable Data { get; set; } = Array.Empty(); /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } } @@ -25,11 +27,13 @@ public record BinanceBrokerageSubAccountSpotAssetInfo /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; /// /// Total Balance Of Btc /// + [JsonPropertyName("totalBalanceOfBtc")] public decimal TotalBalanceOfBtc { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccount.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccount.cs index 77bbd8e49..2cdbe2002 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccount.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccount.cs @@ -8,17 +8,19 @@ public record BinanceBrokerageSubAccount : BinanceBrokerageSubAccountCommission /// /// Email /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Tag /// + [JsonPropertyName("tag")] public string Tag { get; set; } = string.Empty; /// /// Create Date /// - [JsonProperty("createTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime CreateDate { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountApiKey.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountApiKey.cs index 607e17253..1414b7b21 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountApiKey.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountApiKey.cs @@ -8,29 +8,31 @@ public record BinanceBrokerageSubAccountApiKey /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Api Key /// + [JsonPropertyName("apikey")] public string ApiKey { get; set; } = string.Empty; - + /// /// Is Spot Trading Enabled /// - [JsonProperty("canTrade")] + [JsonPropertyName("canTrade")] public bool IsSpotTradingEnabled { get; set; } /// /// Is Margin Trading Enabled /// - [JsonProperty("marginTrade")] + [JsonPropertyName("marginTrade")] public bool IsMarginTradingEnabled { get; set; } /// /// Is Futures Trading Enabled /// - [JsonProperty("futuresTrade")] + [JsonPropertyName("futuresTrade")] public bool IsFuturesTradingEnabled { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCoinFuturesCommission.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCoinFuturesCommission.cs index 357704a81..29cae1517 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCoinFuturesCommission.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCoinFuturesCommission.cs @@ -8,31 +8,37 @@ public record BinanceBrokerageSubAccountCoinFuturesCommission /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; - + /// /// COIN-Ⓜ futures commission adjustment for maker /// + [JsonPropertyName("makerAdjustment")] public int MakerAdjustment { get; set; } - + /// /// COIN-Ⓜ futures commission adjustment for taker /// + [JsonPropertyName("takerAdjustment")] public int TakerAdjustment { get; set; } - + /// /// COIN-Ⓜ futures commission (after adjusted) for maker /// + [JsonPropertyName("makerCommission")] public decimal MakerCommission { get; set; } - + /// /// COIN-Ⓜ futures commission (after adjusted) for taker /// + [JsonPropertyName("takerCommission")] public decimal TakerCommission { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCommission.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCommission.cs index c35fe4ab0..5190a1b41 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCommission.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCommission.cs @@ -8,28 +8,33 @@ public record BinanceBrokerageSubAccountCommission /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Maker Commission /// + [JsonPropertyName("makerCommission")] public decimal MakerCommission { get; set; } - + /// /// Taker Commission /// + [JsonPropertyName("takerCommission")] public decimal TakerCommission { get; set; } - + /// /// Margin Maker Commission /// If margin disabled, return -1 /// + [JsonPropertyName("marginMakerCommission")] public decimal MarginMakerCommission { get; set; } - + /// /// Margin Taker Commission /// If margin disabled, return -1 /// + [JsonPropertyName("marginTakerCommission")] public decimal MarginTakerCommission { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCreateResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCreateResult.cs index ba0b53a7f..c16c91ec7 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCreateResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountCreateResult.cs @@ -8,14 +8,17 @@ public record BinanceBrokerageSubAccountCreateResult /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; /// /// Email /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Tag /// + [JsonPropertyName("tag")] public string Tag { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositTransaction.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositTransaction.cs index d00dbfaa1..e6d412de5 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositTransaction.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountDepositTransaction.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Objects.Models.Spot.Brokerage.SubAccountData +using Binance.Net.Enums; + +namespace Binance.Net.Objects.Models.Spot.Brokerage.SubAccountData { /// /// Sub Account Deposit Transaction @@ -8,60 +10,67 @@ public record BinanceBrokerageSubAccountDepositTransaction /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Address /// + [JsonPropertyName("address")] public string Address { get; set; } = string.Empty; - + /// /// Address Tag /// + [JsonPropertyName("addressTag")] public string AddressTag { get; set; } = string.Empty; - + /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Date /// - [JsonProperty("insertTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("insertTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Network /// + [JsonPropertyName("network")] public string Network { get; set; } = string.Empty; /// /// Status /// - public BinanceBrokerageSubAccountDepositStatus Status { get; set; } - + [JsonPropertyName("status")] + public SubAccountDepositStatus Status { get; set; } + /// /// Transaction Id /// - [JsonProperty("txId")] + [JsonPropertyName("txId")] public string TransactionId { get; set; } = string.Empty; /// /// Source Address /// + [JsonPropertyName("sourceAddress")] public string SourceAddress { get; set; } = string.Empty; - + /// /// Confirm Times /// + [JsonPropertyName("confirmTimes")] public string ConfirmTimes { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountFuturesCommission.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountFuturesCommission.cs index dd9637bef..e5f32c67d 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountFuturesCommission.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageSubAccountFuturesCommission.cs @@ -8,36 +8,43 @@ public record BinanceBrokerageSubAccountFuturesCommission /// /// Sub Account Id /// + [JsonPropertyName("subaccountId")] public string SubAccountId { get; set; } = string.Empty; - + /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Pair /// + [JsonPropertyName("pair")] public string Pair { get; set; } = string.Empty; /// /// USDT-Ⓜ futures commission adjustment for maker /// + [JsonPropertyName("makerAdjustment")] public int MakerAdjustment { get; set; } - + /// /// USDT-Ⓜ futures commission adjustment for taker /// + [JsonPropertyName("takerAdjustment")] public int TakerAdjustment { get; set; } - + /// /// USDT-Ⓜ futures commission (after adjusted) for maker /// + [JsonPropertyName("makerCommission")] public decimal MakerCommission { get; set; } - + /// /// USDT-Ⓜ futures commission (after adjusted) for taker /// + [JsonPropertyName("takerCommission")] public decimal TakerCommission { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesResult.cs index f20897053..56001b68a 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesResult.cs @@ -8,18 +8,19 @@ public record BinanceBrokerageTransferFuturesResult /// /// Transaction Id /// - [JsonProperty("txnId")] + [JsonPropertyName("txnId")] public string Id { get; set; } = string.Empty; /// /// Success /// + [JsonPropertyName("success")] public bool Success { get; set; } - + /// /// Client Transfer Id /// - [JsonProperty("clientTranId")] + [JsonPropertyName("clientTranId")] public string ClientTransferId { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesTransaction.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesTransaction.cs index 45a0bc991..54558ac66 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesTransaction.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferFuturesTransaction.cs @@ -1,4 +1,6 @@ -namespace Binance.Net.Objects.Models.Spot.Brokerage.SubAccountData +using Binance.Net.Enums; + +namespace Binance.Net.Objects.Models.Spot.Brokerage.SubAccountData { /// /// Transfer Futures Transactions @@ -8,17 +10,19 @@ public record BinanceBrokerageTransferFuturesTransactions /// /// Success /// + [JsonPropertyName("success")] public bool Success { get; set; } - + /// /// Futures type /// - public BinanceBrokerageFuturesType FuturesType { get; set; } + [JsonPropertyName("futuresType")] + public FuturesAccountType FuturesType { get; set; } /// /// Transfer /// - [JsonProperty("transfer")] + [JsonPropertyName("transfer")] public IEnumerable Transactions { get; set; } = Array.Empty(); } @@ -30,40 +34,43 @@ public record BinanceBrokerageTransferFuturesTransaction /// /// From Id /// + [JsonPropertyName("fromId")] public string FromId { get; set; } = string.Empty; - + /// /// To Id /// + [JsonPropertyName("toId")] public string ToId { get; set; } = string.Empty; - + /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; - + /// /// Quantity /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// Transaction Id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public string Id { get; set; } = string.Empty; /// /// Client Transfer Id /// - [JsonProperty("clientTranId")] + [JsonPropertyName("clientTranId")] public string ClientTransferId { get; set; } = string.Empty; /// /// Date /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Date { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferResult.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferResult.cs index 93d14332b..9f995cb8c 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferResult.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferResult.cs @@ -8,13 +8,13 @@ public record BinanceBrokerageTransferResult /// /// Transaction Id /// - [JsonProperty("txnId")] + [JsonPropertyName("txnId")] public string Id { get; set; } = string.Empty; /// /// Client Transfer Id /// - [JsonProperty("clientTranId")] + [JsonPropertyName("clientTranId")] public string ClientTransferId { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransaction.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransaction.cs index 16e86e62a..e294055c1 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransaction.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransaction.cs @@ -11,46 +11,49 @@ public record BinanceBrokerageTransferTransaction /// /// Transaction Id /// - [JsonProperty("txnId")] + [JsonPropertyName("txnId")] public string Id { get; set; } = string.Empty; /// /// Client Transfer Id /// - [JsonProperty("clientTranId")] + [JsonPropertyName("clientTranId")] public string ClientTransferId { get; set; } = string.Empty; /// /// From Id /// + [JsonPropertyName("fromId")] public string FromId { get; set; } = string.Empty; - + /// /// To Id /// + [JsonPropertyName("toId")] public string ToId { get; set; } = string.Empty; - + /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; - + /// /// Quantity /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// Date /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Date { get; set; } /// /// Status /// - [JsonConverter(typeof(BrokerageTransferTransactionStatusConverter))] + [JsonPropertyName("status")] public BrokerageTransferTransactionStatus Status { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransactionUniversal.cs b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransactionUniversal.cs index bd1be3aef..5c49e1913 100644 --- a/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransactionUniversal.cs +++ b/Binance.Net/Objects/Models/Spot/Brokerage/SubAccountData/BinanceBrokerageTransferTransactionUniversal.cs @@ -11,53 +11,55 @@ public record BinanceBrokerageTransferTransactionUniversal /// /// Transaction Id /// - [JsonProperty("txnId")] + [JsonPropertyName("txnId")] public string Id { get; set; } = string.Empty; /// /// Client Transfer Id /// - [JsonProperty("clientTranId")] + [JsonPropertyName("clientTranId")] public string ClientTransferId { get; set; } = string.Empty; /// /// To id /// + [JsonPropertyName("toId")] public string ToId { get; set; } = string.Empty; /// /// From account type /// - [JsonConverter(typeof(BrokerageAccountTypeConverter))] + [JsonPropertyName("fromAccountType")] public BrokerageAccountType FromAccountType { get; set; } /// /// To account type /// - [JsonConverter(typeof(BrokerageAccountTypeConverter))] + [JsonPropertyName("toAccountType")] public BrokerageAccountType ToAccountType { get; set; } - + /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// Date /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Date { get; set; } /// /// Status /// - [JsonConverter(typeof(BrokerageTransferTransactionStatusConverter))] + [JsonPropertyName("status")] public BrokerageTransferTransactionStatus Status { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertAssetPair.cs b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertAssetPair.cs index 1c1fee41e..a6373b8ed 100644 --- a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertAssetPair.cs +++ b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertAssetPair.cs @@ -8,32 +8,32 @@ public record BinanceConvertAssetPair /// /// Quote asset /// - [JsonProperty("fromAsset")] + [JsonPropertyName("fromAsset")] public string QuoteAsset { get; set; } = string.Empty; /// /// Base asset /// - [JsonProperty("toAsset")] + [JsonPropertyName("toAsset")] public string BaseAsset { get; set; } = string.Empty; /// /// Quote asset min quantity /// - [JsonProperty("fromAssetMinAmount")] + [JsonPropertyName("fromAssetMinAmount")] public decimal QuoteAssetMinQuantity { get; set; } /// /// Quote asset max quantity /// - [JsonProperty("fromAssetMaxAmount")] + [JsonPropertyName("fromAssetMaxAmount")] public decimal QuoteAssetMaxQuantity { get; set; } /// /// Base asset min quantity /// - [JsonProperty("toAssetMinAmount")] + [JsonPropertyName("toAssetMinAmount")] public decimal BaseAssetMinQuantity { get; set; } /// /// Base asset max quantity /// - [JsonProperty("toAssetMaxAmount")] + [JsonPropertyName("toAssetMaxAmount")] public decimal BaseAssetMaxQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertOrderStatus.cs b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertOrderStatus.cs index 2c8add254..eee016eea 100644 --- a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertOrderStatus.cs +++ b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertOrderStatus.cs @@ -10,45 +10,49 @@ public record BinanceConvertOrderStatus /// /// Order id /// - public string OrderId { get; set; } = string.Empty; + [JsonPropertyName("orderId")] + public long OrderId { get; set; } /// /// Order status /// [JsonConverter(typeof(EnumConverter))] - [JsonProperty("orderStatus")] + [JsonPropertyName("orderStatus")] public ConvertOrderStatus Status { get; set; } /// /// Quote asset /// - [JsonProperty("fromAsset")] + [JsonPropertyName("fromAsset")] public string QuoteAsset { get; set; } = string.Empty; /// /// Quote quantity /// - [JsonProperty("fromAmount")] + [JsonPropertyName("fromAmount")] public decimal QuoteQuantity { get; set; } /// /// Base asset /// - [JsonProperty("toAsset")] + [JsonPropertyName("toAsset")] public string BaseAsset { get; set; } = string.Empty; /// /// Base quantity /// - [JsonProperty("toAmount")] + [JsonPropertyName("toAmount")] public decimal BaseQuantity { get; set; } /// /// Price ratio /// + [JsonPropertyName("ratio")] public decimal Ratio { get; set; } /// /// Inverse price ratio /// + [JsonPropertyName("inverseRatio")] public decimal InverseRatio { get; set; } /// /// Creation time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuantityPrecisionAsset.cs b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuantityPrecisionAsset.cs index 037cdd975..e2390024a 100644 --- a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuantityPrecisionAsset.cs +++ b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuantityPrecisionAsset.cs @@ -8,10 +8,12 @@ public record BinanceConvertQuantityPrecisionAsset /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Fraction /// + [JsonPropertyName("fraction")] public int Fraction { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuote.cs b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuote.cs index 72cd6c7ad..c2319bee3 100644 --- a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuote.cs +++ b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertQuote.cs @@ -8,28 +8,32 @@ public record BinanceConvertQuote /// /// Quote id /// + [JsonPropertyName("quoteId")] public string? QuoteId { get; set; } /// /// Price ratio /// + [JsonPropertyName("ratio")] public decimal Ratio { get; set; } /// /// Inverse price ratio /// + [JsonPropertyName("inverseRatio")] public decimal InverseRatio { get; set; } /// /// Valid Timestamp /// + [JsonPropertyName("validTimestamp")] public long ValidTimestamp { get; set; } /// /// Base quantity /// - [JsonProperty("toAmount")] + [JsonPropertyName("toAmount")] public decimal BaseQuantity { get; set; } /// /// Quote quantity /// - [JsonProperty("fromAmount")] + [JsonPropertyName("fromAmount")] public decimal QuoteQuantity { get; set; } } diff --git a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertResult.cs b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertResult.cs index b70dcbd71..7ffde8d02 100644 --- a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertResult.cs +++ b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertResult.cs @@ -10,17 +10,19 @@ public record BinanceConvertResult /// /// Order id /// + [JsonPropertyName("orderId")] public string OrderId { get; set; } = string.Empty; /// /// Creation time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } /// /// Order status /// [JsonConverter(typeof(EnumConverter))] - [JsonProperty("orderStatus")] + [JsonPropertyName("orderStatus")] public ConvertOrderStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertTrade.cs b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertTrade.cs index 5d81a2e44..7609ed8e1 100644 --- a/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertTrade.cs +++ b/Binance.Net/Objects/Models/Spot/Convert/BinanceConvertTrade.cs @@ -10,49 +10,54 @@ public record BinanceConvertTrade /// /// Quote id /// + [JsonPropertyName("quoteId")] public string QuoteId { get; set; } = string.Empty; /// /// Order id /// - public string OrderId { get; set; } = string.Empty; + [JsonPropertyName("orderId")] + public long OrderId { get; set; } /// /// Order status /// [JsonConverter(typeof(EnumConverter))] - [JsonProperty("orderStatus")] + [JsonPropertyName("orderStatus")] public ConvertOrderStatus Status { get; set; } /// /// Quote asset /// - [JsonProperty("fromAsset")] + [JsonPropertyName("fromAsset")] public string QuoteAsset { get; set; } = string.Empty; /// /// Quote quantity /// - [JsonProperty("fromAmount")] + [JsonPropertyName("fromAmount")] public decimal QuoteQuantity { get; set; } /// /// Base asset /// - [JsonProperty("toAsset")] + [JsonPropertyName("toAsset")] public string BaseAsset { get; set; } = string.Empty; /// /// Base quantity /// - [JsonProperty("toAmount")] + [JsonPropertyName("toAmount")] public decimal BaseQuantity { get; set; } /// /// Price ratio /// + [JsonPropertyName("ratio")] public decimal Ratio { get; set; } /// /// Inverse price ratio /// + [JsonPropertyName("inverseRatio")] public decimal InverseRatio { get; set; } /// /// Creation time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferRecord.cs b/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferRecord.cs index dbd551b6c..ebd5ca20d 100644 --- a/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferRecord.cs +++ b/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferRecord.cs @@ -8,42 +8,48 @@ public record BinanceConvertTransferRecord /// /// Transfer id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransferId { get; set; } /// /// Status of the transfer (definitions currently unknown) /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time")] public DateTime Time { get; set; } /// /// Type /// + [JsonPropertyName("type")] public int Type { get; set; } /// /// Deducted asset /// + [JsonPropertyName("deductAsset")] public string DeductedAsset { get; set; } = string.Empty; /// /// Deducted quantity /// - [JsonProperty("deductedAmount")] + [JsonPropertyName("deductedAmount")] public decimal DeductedQuantity { get; set; } /// /// Target asset /// + [JsonPropertyName("targetAsset")] public string TargetAsset { get; set; } = string.Empty; /// /// Target quantity /// - [JsonProperty("targetAmount")] + [JsonPropertyName("targetAmount")] public decimal TargetQuantity { get; set; } /// /// Account type /// + [JsonPropertyName("accountType")] public string AccountType { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferResult.cs b/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferResult.cs index 8ceac19a5..279243ade 100644 --- a/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferResult.cs +++ b/Binance.Net/Objects/Models/Spot/ConvertTransfer/BinanceConvertTransferResult.cs @@ -8,11 +8,12 @@ public record BinanceConvertTransferResult /// /// Transfer id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransferId { get; set; } /// /// Status of the transfer (definitions currently unknown) /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvHistory.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvHistory.cs deleted file mode 100644 index b99527982..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvHistory.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Adjust history - /// - public record BinanceCrossCollateralAdjustLtvHistory - { - /// - /// Quantity - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - - /// - /// Collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - - /// - /// Asset - /// - [JsonProperty("coin")] - public string Asset { get; set; } = string.Empty; - /// - /// Pre adjustment rate - /// - public decimal PreCollateralRate { get; set; } - /// - /// After adjustment rate - /// - public decimal AfterCollateralRate { get; set; } - /// - /// Direction - /// - [JsonConverter(typeof(AdjustRateDirectionConverter))] - public AdjustRateDirection Direction { get; set; } - - /// - /// Status - /// - public string Status { get; set; } = string.Empty; - /// - /// Time of adjustment - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime AdjustTime { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvResult.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvResult.cs deleted file mode 100644 index ae5c8993b..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustLtvResult.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Adjust result - /// - public record BinanceCrossCollateralAdjustLtvResult - { - /// - /// Collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// Loan asset - /// - [JsonProperty("loanCoin")] - public string LoanAsset { get; set; } = string.Empty; - /// - /// The direction - /// - [JsonConverter(typeof(AdjustRateDirectionConverter))] - public AdjustRateDirection Direction { get; set; } - /// - /// The quantity - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// The time - /// - [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] - public DateTime Timestamp { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustMaxAmounts.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustMaxAmounts.cs deleted file mode 100644 index 0d0e86c5b..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAdjustMaxAmounts.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Max quantities - /// - public record BinanceCrossCollateralAdjustMaxAmounts - { - /// - /// The max in amount - /// - [JsonProperty("maxInAmount")] - public decimal MaxInQuantity { get; set; } - /// - /// The max out amount - /// - [JsonProperty("maxOutAmount")] - public decimal MaxOutQuantity { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAfterAdjust.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAfterAdjust.cs deleted file mode 100644 index 4ccb27130..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralAfterAdjust.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// After adjustment rate - /// - public record BinanceCrossCollateralAfterAdjust - { - /// - /// The rate after adjustment - /// - public decimal AfterCollateralRate { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowHistory.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowHistory.cs deleted file mode 100644 index faa85fa30..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowHistory.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Borrow history - /// - public record BinanceCrossCollateralBorrowHistory - { - /// - /// Id - /// - public string BorrowId { get; set; } = string.Empty; - /// - /// Time of confirmation - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime ConfirmedTime { get; set; } - - /// - /// Asset - /// - [JsonProperty("coin")] - public string Asset { get; set; } = string.Empty; - /// - /// The collateral rate - /// - public decimal CollateralRate { get; set; } - /// - /// Total left - /// - public decimal LeftTotal { get; set; } - /// - /// Principal left - /// - public decimal LeftPrincipal { get; set; } - /// - /// Dead line - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime DeadLine { get; set; } - /// - /// Collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// Collateral quantity - /// - [JsonProperty("collateralAmount")] - public decimal CollateralQuantity { get; set; } - /// - /// The status of the transfer - /// - [JsonConverter(typeof(FuturesTransferStatusConverter))] - [JsonProperty("orderStatus")] - public FuturesTransferStatus Status { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowResult.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowResult.cs deleted file mode 100644 index 872292dc2..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralBorrowResult.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Borrow result - /// - public record BinanceCrossCollateralBorrowResult - { - /// - /// Id - /// - public string BorrowId { get; set; } = string.Empty; - /// - /// The asset borrowed - /// - [JsonProperty("coin")] - public string Asset { get; set; } = string.Empty; - /// - /// The asset used for collateral - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// The quantity borrowed - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// The collateral quantity - /// - [JsonProperty("collateralAmount")] - public decimal CollateralQuantity { get; set; } - /// - /// The timestamp - /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] - public DateTime Timestamp { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInformation.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInformation.cs deleted file mode 100644 index e7b2e92fb..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInformation.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Collateral info - /// - public record BinanceCrossCollateralInformation - { - /// - /// The loan asset - /// - [JsonProperty("loanCoin")] - public string LoanAsset { get; set; } = string.Empty; - /// - /// The collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// Rate - /// - public decimal Rate { get; set; } - /// - /// Margin call collateral rate - /// - public decimal MarginCallCollateralRate { get; set; } - /// - /// Liquidation collateal rate - /// - public decimal LiquidationCollateralRate { get; set; } - /// - /// Current collateral rate - /// - public decimal CurrentCollateralRate { get; set; } - /// - /// Interest rate - /// - public decimal InterestRate { get; set; } - /// - /// In days - /// - public int InterestGracePeriod { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInterestHistory.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInterestHistory.cs deleted file mode 100644 index ec620fbe7..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralInterestHistory.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Interest history - /// - public record BinanceCrossCollateralInterestHistory - { - /// - /// Collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// Interest asset - /// - [JsonProperty("interestCoin")] - public string InterestAsset { get; set; } = string.Empty; - /// - /// Interest - /// - [JsonProperty("interest")] - public decimal Interest { get; set; } - - /// - /// Interest free limit used - /// - [JsonProperty("interestFreeLimitUsed")] - public decimal InterestFreeLimitUsed { get; set; } - /// - /// Principal interest - /// - [JsonProperty("principalForInterest")] - public decimal PrincipalInterest { get; set; } - - /// - /// Time - /// - [JsonProperty("time")] - [JsonConverter(typeof(DateTimeConverter))] - public DateTime Timestamp { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralLiquidationHistory.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralLiquidationHistory.cs deleted file mode 100644 index 07032f0ea..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralLiquidationHistory.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Liquidation history - /// - public record BinanceCrossCollateralLiquidationHistory - { - /// - /// Quantity for liquidation - /// - [JsonProperty("collateralAmountForLiquidation")] - public decimal CollateralQuantityForLiquidation { get; set; } - - /// - /// Collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// Start time of liquidation - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime ForceLiquidationStartTime { get; set; } - /// - /// Asset - /// - [JsonProperty("coin")] - public string Asset { get; set; } = string.Empty; - /// - /// Rest collateral quantity after liquidation - /// - [JsonProperty("restCollateralAmountAfterLiquidation")] - public decimal RestCollateralQuantityAfterLiquidation { get; set; } - /// - /// Rest loan quantity - /// - [JsonProperty("restLoanAmount")] - public decimal RestLoanQuantity { get; set; } - - /// - /// Status - /// - public string Status { get; set; } = string.Empty; - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayHistory.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayHistory.cs deleted file mode 100644 index 053f8e90d..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayHistory.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Repay history - /// - public record BinanceCrossCollateralRepayHistory - { - /// - /// Id - /// - public string RepayId { get; set; } = string.Empty; - /// - /// Time of confirmation - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime ConfirmedTime { get; set; } - - /// - /// Time of last update - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime UpdateTime { get; set; } - - /// - /// Asset - /// - [JsonProperty("coin")] - public string Asset { get; set; } = string.Empty; - /// - /// Collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// Quantity - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// Released collateral quantity - /// - public decimal ReleasedCollateral { get; set; } - /// - /// The status of the transfer - /// - [JsonConverter(typeof(FuturesTransferStatusConverter))] - public FuturesTransferStatus Status { get; set; } - /// - /// Repay type - /// - public string RepayType { get; set; } = string.Empty; - /// - /// Collateral repayment - /// - public decimal? RepayCollateral { get; set; } - /// - /// Loan/collateral exchange rate - /// - public decimal Price { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayResult.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayResult.cs deleted file mode 100644 index 65efc7891..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralRepayResult.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Repay result - /// - public record BinanceCrossCollateralRepayResult - { - /// - /// Id - /// - public string RepayId { get; set; } = string.Empty; - /// - /// The asset borrowed - /// - [JsonProperty("coin")] - public string Asset { get; set; } = string.Empty; - /// - /// The asset used for collateral - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// The quantity borrowed - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralWallet.cs b/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralWallet.cs deleted file mode 100644 index e41d64ce8..000000000 --- a/Binance.Net/Objects/Models/Spot/Futures/BinanceCrossCollateralWallet.cs +++ /dev/null @@ -1,75 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Futures -{ - /// - /// Cross colateral wallet info - /// - public record BinanceCrossCollateralWallet - { - /// - /// Total cross collateral - /// - public decimal TotalCrossCollateral { get; set; } - /// - /// Total borrowed - /// - public decimal TotalBorrowed { get; set; } - /// - /// Total interest - /// - public decimal TotalInterest { get; set; } - /// - /// Interest free limit - /// - public decimal InterestFreeLimit { get; set; } - /// - /// The asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Cross collaterals - /// - public IEnumerable CrossCollaterals { get; set; } = Array.Empty(); - } - - /// - /// Cross collateral data - /// - public record BinanceCrossCollateralWalletEntry - { - /// - /// Loan asset - /// - [JsonProperty("loanCoin")] - public string LoanAsset { get; set; } = string.Empty; - /// - /// Collateral asset - /// - [JsonProperty("collateralCoin")] - public string CollateralAsset { get; set; } = string.Empty; - /// - /// Quantity locked - /// - public decimal Locked { get; set; } - /// - /// Loan quantity - /// - [JsonProperty("loanAmount")] - public decimal LoanQuantity { get; set; } - /// - /// Current collateral rate - /// - public decimal CurrentCollateralRate { get; set; } - /// - /// Used interest free limit - /// - public decimal InterestFreeLimitUsed { get; set; } - /// - /// Principal interest - /// - public decimal PrincipalForInterest { get; set; } - /// - /// Interest - /// - public decimal Interest { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginSymbol.cs b/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginSymbol.cs index 63c856b0c..a287e0dbd 100644 --- a/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginSymbol.cs +++ b/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginSymbol.cs @@ -8,31 +8,37 @@ public record BinanceIsolatedMarginSymbol /// /// Symbol name /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Base asset /// + [JsonPropertyName("base")] public string Base { get; set; } = string.Empty; /// /// Quote asset /// + [JsonPropertyName("quote")] public string Quote { get; set; } = string.Empty; /// /// Margin trade /// + [JsonPropertyName("isMarginTrade")] public bool IsMarginTrade { get; set; } /// /// Is buy allowed /// + [JsonPropertyName("isBuyAllowed")] public bool IsBuyAllowed { get; set; } /// /// Is sell allowed /// + [JsonPropertyName("isSellAllowed")] public bool IsSellAllowed { get; set; } /// /// Time at which the symbol gets delisted /// - [JsonProperty("delistTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("delistTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime? DelistTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginTransfer.cs b/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginTransfer.cs index 863fb0c7c..8393f1723 100644 --- a/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginTransfer.cs +++ b/Binance.Net/Objects/Models/Spot/IsolatedMargin/BinanceIsolatedMarginTransfer.cs @@ -11,36 +11,39 @@ public record BinanceIsolatedMarginTransfer /// /// Quantity of the transfer /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Transfer asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Status of the transfer /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Timestamp of the transfer /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } /// /// Transaction id /// - [JsonProperty("txId")] + [JsonPropertyName("txId")] public string TransactionId { get; set; } = string.Empty; /// /// From /// - [JsonProperty("transFrom"), JsonConverter(typeof(IsolatedMarginTransferDirectionConverter))] + [JsonPropertyName("transFrom")] public IsolatedMarginTransferDirection From { get; set; } /// /// To /// - [JsonProperty("transTo"), JsonConverter(typeof(IsolatedMarginTransferDirectionConverter))] + [JsonPropertyName("transTo")] public IsolatedMarginTransferDirection To { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/IsolatedMargin/CreateIsolatedMarginAccountResult.cs b/Binance.Net/Objects/Models/Spot/IsolatedMargin/CreateIsolatedMarginAccountResult.cs index 04080c5f3..ff2f7c1f0 100644 --- a/Binance.Net/Objects/Models/Spot/IsolatedMargin/CreateIsolatedMarginAccountResult.cs +++ b/Binance.Net/Objects/Models/Spot/IsolatedMargin/CreateIsolatedMarginAccountResult.cs @@ -8,11 +8,13 @@ public record CreateIsolatedMarginAccountResult /// /// Success /// + [JsonPropertyName("success")] public bool Success { get; set; } /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccount.cs b/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccount.cs index 6b2cf46df..338b81c9b 100644 --- a/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccount.cs +++ b/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccount.cs @@ -11,18 +11,22 @@ public record BinanceIsolatedMarginAccount /// /// Account assets /// + [JsonPropertyName("assets")] public IEnumerable Assets { get; set; } = Array.Empty(); /// /// Total btc asset /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } /// /// Total liability /// + [JsonPropertyName("totalLiabilityOfBtc")] public decimal TotalLiabilityOfBtc { get; set; } /// /// Total net asset /// + [JsonPropertyName("totalNetAssetOfBtc")] public decimal TotalNetAssetOfBtc { get; set; } } @@ -34,53 +38,64 @@ public record BinanceIsolatedMarginAccountSymbol /// /// Base asset /// + [JsonPropertyName("baseAsset")] public BinanceIsolatedMarginAccountAsset BaseAsset { get; set; } = default!; /// /// Quote asset /// + [JsonPropertyName("quoteAsset")] public BinanceIsolatedMarginAccountAsset QuoteAsset { get; set; } = default!; /// /// Symbol name /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Isolated created /// + [JsonPropertyName("isolatedCreated")] public bool IsolatedCreated { get; set; } /// /// The margin level /// + [JsonPropertyName("marginLevel")] public decimal MarginLevel { get; set; } /// /// Margin level status /// - [JsonConverter(typeof(MarginLevelStatusConverter))] + [JsonPropertyName("marginLevelStatus")] public MarginLevelStatus MarginLevelStatus { get; set; } /// /// Margin ratio /// + [JsonPropertyName("marginRatio")] public decimal MarginRatio { get; set; } /// /// Index price /// + [JsonPropertyName("indexPrice")] public decimal IndexPrice { get; set; } /// /// Liquidate price /// + [JsonPropertyName("liquidatePrice")] public decimal LiquidatePrice { get; set; } /// /// Liquidate rate /// + [JsonPropertyName("liquidateRate")] public decimal LiquidateRate { get; set; } /// /// If trading is enabled /// + [JsonPropertyName("tradeEnabled")] public bool TradeEnabled { get; set; } /// /// Account is enabled /// + [JsonPropertyName("enabled")] public bool Enabled { get; set; } } @@ -92,42 +107,52 @@ public record BinanceIsolatedMarginAccountAsset /// /// Asset name /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// If borrow is enabled /// + [JsonPropertyName("borrowEnabled")] public bool BorrowEnabled { get; set; } /// /// Borrowed /// + [JsonPropertyName("borrowed")] public decimal Borrowed { get; set; } /// /// Free /// + [JsonPropertyName("free")] public decimal Free { get; set; } /// /// Interest /// + [JsonPropertyName("interest")] public decimal Interest { get; set; } /// /// Locked /// + [JsonPropertyName("locked")] public decimal Locked { get; set; } /// /// Net asset /// + [JsonPropertyName("netAsset")] public decimal NetAsset { get; set; } /// /// Net asset in btc /// + [JsonPropertyName("netAssetOfBtc")] public decimal NetAssetOfBtc { get; set; } /// /// Is repay enabled /// + [JsonPropertyName("repayEnabled")] public bool RepayEnabled { get; set; } /// /// Total asset /// + [JsonPropertyName("totalAsset")] public decimal TotalAsset { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccountLimit.cs b/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccountLimit.cs index ba78158a5..88dc6e88a 100644 --- a/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccountLimit.cs +++ b/Binance.Net/Objects/Models/Spot/IsolatedMargin/IsolatedMarginAccountLimit.cs @@ -9,10 +9,12 @@ public record IsolatedMarginAccountLimit /// /// Current enabled accounts /// + [JsonPropertyName("enabledAccount")] public int EnabledAccount { get; set; } /// /// Max accounts /// + [JsonPropertyName("maxAccount")] public int MaxAccount { get; set; } } } \ No newline at end of file diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanAsset.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanAsset.cs index a0aee2a30..191f447e8 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanAsset.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanAsset.cs @@ -8,75 +8,75 @@ public record BinanceCryptoLoanAsset /// /// Loan asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// Hourly interest rate for 7 days /// - [JsonProperty("_7dHourlyInterestRate")] + [JsonPropertyName("_7dHourlyInterestRate")] public decimal HourlyInterest7Days { get; set; } /// /// Daily interest rate for 7 days /// - [JsonProperty("_7dDailyInterestRate")] + [JsonPropertyName("_7dDailyInterestRate")] public decimal DailyInterest7Days { get; set; } /// /// Hourly interest rate for 14 days /// - [JsonProperty("_14dHourlyInterestRate")] + [JsonPropertyName("_14dHourlyInterestRate")] public decimal HourlyInterest14Days { get; set; } /// /// Daily interest rate for 14 days /// - [JsonProperty("_14dDailyInterestRate")] + [JsonPropertyName("_14dDailyInterestRate")] public decimal DailyInterest14Days { get; set; } /// /// Daily interest rate for 30 days /// - [JsonProperty("_30dHourlyInterestRate")] + [JsonPropertyName("_30dHourlyInterestRate")] public decimal HourlyInterest30Days { get; set; } /// /// Daily interest rate for 30 days /// - [JsonProperty("_30dDailyInterestRate")] + [JsonPropertyName("_30dDailyInterestRate")] public decimal DailyInterest30Days { get; set; } /// /// Daily interest rate for 90 days /// - [JsonProperty("_90dHourlyInterestRate")] + [JsonPropertyName("_90dHourlyInterestRate")] public decimal HourlyInterest90Days { get; set; } /// /// Daily interest rate for 90 days /// - [JsonProperty("_90dDailyInterestRate")] + [JsonPropertyName("_90dDailyInterestRate")] public decimal DailyInterest90Days { get; set; } /// /// Daily interest rate for 180 days /// - [JsonProperty("_180dHourlyInterestRate")] + [JsonPropertyName("_180dHourlyInterestRate")] public decimal HourlyInterest180Days { get; set; } /// /// Daily interest rate for 180 days /// - [JsonProperty("_180dDailyInterestRate")] + [JsonPropertyName("_180dDailyInterestRate")] public decimal DailyInterest180Days { get; set; } /// /// Min limit /// - [JsonProperty("minLimit")] + [JsonPropertyName("minLimit")] public decimal MinLimit { get; set; } /// /// Min limit /// - [JsonProperty("maxLimit")] + [JsonPropertyName("maxLimit")] public decimal MaxLimit { get; set; } /// /// Vip level /// - [JsonProperty("vipLevel")] + [JsonPropertyName("vipLevel")] public int VipLevel { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrow.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrow.cs index 02d1db867..e69b0d5a7 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrow.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrow.cs @@ -8,30 +8,32 @@ public record BinanceCryptoLoanBorrow /// /// The loaning asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// The collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// The loan quantity /// - [JsonProperty("loanAmount")] + [JsonPropertyName("loanAmount")] public decimal LoanQuantity { get; set; } /// /// The collateral quantity /// - [JsonProperty("collateralAmount")] + [JsonPropertyName("collateralAmount")] public decimal CollateralQuantity { get; set; } /// /// Hourly interest rate /// + [JsonPropertyName("hourlyInterestRate")] public decimal HourlyInterestRate { get; set; } /// /// Borrow order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrowRecord.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrowRecord.cs index 026a253df..eb73c9df4 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrowRecord.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanBorrowRecord.cs @@ -10,44 +10,49 @@ public record BinanceCryptoLoanBorrowRecord /// /// The loaning asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// The collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// The loan quantity /// - [JsonProperty("initialLoanAmount")] + [JsonPropertyName("initialLoanAmount")] public decimal InitialLoanQuantity { get; set; } /// /// The collateral quantity /// - [JsonProperty("initialCollateralAmount")] + [JsonPropertyName("initialCollateralAmount")] public decimal InitialCollateralQuantity { get; set; } /// /// Hourly interest rate /// + [JsonPropertyName("hourlyInterestRate")] public decimal HourlyInterestRate { get; set; } /// /// Loan term /// + [JsonPropertyName("loanTerm")] public int LoanTerm { get; set; } /// /// Borrow order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// Borrow timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("borrowTime")] public DateTime BorrowTime { get; set; } /// /// Status of the order /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("status")] public BorrowStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanCollateralAsset.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanCollateralAsset.cs index b96149280..ed6eb87de 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanCollateralAsset.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanCollateralAsset.cs @@ -8,32 +8,32 @@ public record BinanceCryptoLoanCollateralAsset /// /// Collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string ColleteralAsset { get; set; } = string.Empty; /// /// Initial ltv /// - [JsonProperty("initialLTV")] + [JsonPropertyName("initialLTV")] public decimal InitialLtv { get; set; } /// /// Margin call ltv /// - [JsonProperty("marginCallLTV")] + [JsonPropertyName("marginCallLTV")] public decimal MarginCallLtv { get; set; } /// /// Liquidation ltv /// - [JsonProperty("liquidationLTV")] + [JsonPropertyName("liquidationLTV")] public decimal LiquidationLtv { get; set; } /// /// Max limit /// - [JsonProperty("maxLimit")] + [JsonPropertyName("maxLimit")] public decimal MaxLimit { get; set; } /// /// Vip level /// - [JsonProperty("vipLevel")] + [JsonPropertyName("vipLevel")] public int VipLevel { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanIncome.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanIncome.cs index 57f8cb309..29660a040 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanIncome.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanIncome.cs @@ -11,27 +11,29 @@ public record BinanceCryptoLoanIncome /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Income type /// - [JsonConverter(typeof(LoanIncomeTypeConverter))] + [JsonPropertyName("type")] public LoanIncomeType Type { get; set; } /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public string TransactionId { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjust.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjust.cs index b0e4ae4e5..72535fe5b 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjust.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjust.cs @@ -8,25 +8,27 @@ public record BinanceCryptoLoanLtvAdjust /// /// The loaning asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// The collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// Direction /// + [JsonPropertyName("direction")] public string Direction { get; set; } = string.Empty; /// /// Amount /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Current ltv /// + [JsonPropertyName("currentLTV")] public decimal CurrentLtv { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjustRecord.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjustRecord.cs index 9aaa9a5f0..ba802cfb5 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjustRecord.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanLtvAdjustRecord.cs @@ -8,38 +8,43 @@ public record BinanceCryptoLoanLtvAdjustRecord /// /// The loaning asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// The collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// Direction /// + [JsonPropertyName("direction")] public string Direction { get; set; } = string.Empty; /// /// Amount /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Pre adjust ltv /// + [JsonPropertyName("preLTV")] public decimal PreLtv { get; set; } /// /// Post adjust ltv /// + [JsonPropertyName("afterLTV")] public decimal AfterLtv { get; set; } /// /// Adjust time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("adjustTime")] public DateTime AdjustTime { get; set; } /// /// Order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanMarginCallResult.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanMarginCallResult.cs index f9d49e035..cf0b0b596 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanMarginCallResult.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanMarginCallResult.cs @@ -8,27 +8,27 @@ public record BinanceCryptoLoanMarginCallResult /// /// Order id /// - [JsonProperty("orderId")] + [JsonPropertyName("orderId")] public string OrderId { get; set; } = string.Empty; /// /// Collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// Pre margin call /// - [JsonProperty("preMarginCall")] + [JsonPropertyName("preMarginCall")] public decimal PreMarginCall { get; set; } /// /// After margin call /// - [JsonProperty("afterMarginCall")] + [JsonPropertyName("afterMarginCall")] public decimal AfterMarginCall { get; set; } /// /// Timestamp /// - [JsonProperty("customizeTime")] + [JsonPropertyName("customizeTime")] [JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanOpenBorrowOrder.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanOpenBorrowOrder.cs index 9e883dc0d..5d6134a9d 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanOpenBorrowOrder.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanOpenBorrowOrder.cs @@ -8,38 +8,43 @@ public record BinanceCryptoLoanOpenBorrowOrder /// /// The loaning asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// The collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// The collateral quantity /// - [JsonProperty("collateralAmount")] + [JsonPropertyName("collateralAmount")] public decimal CollateralQuantity { get; set; } /// /// Borrow order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// Total debt /// + [JsonPropertyName("totalDebt")] public decimal TotalDebt { get; set; } /// /// Residual interest /// + [JsonPropertyName("residualInterest")] public decimal ResidualInterest { get; set; } /// /// Current LTV /// + [JsonPropertyName("currentLTV")] public decimal CurrentLTV { get; set; } /// /// Expiration time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("expirationTime")] public DateTime ExpirationTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepay.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepay.cs index 7f09b2c42..5c22206fa 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepay.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepay.cs @@ -10,33 +10,38 @@ public record BinanceCryptoLoanRepay /// /// The loaning asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// The collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// Current LTV /// + [JsonPropertyName("currentLTV")] public decimal? CurrentLTV { get; set; } /// /// Remaining principal /// + [JsonPropertyName("remainingPrincipal")] public decimal? RemainingPrincipal { get; set; } /// /// Repay status /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("repayStatus")] public BorrowStatus RepayStatus { get; set; } /// /// Remaining collateral /// + [JsonPropertyName("remainingCollateral")] public decimal? RemainingCollateral { get; set; } /// /// Remaining interest /// + [JsonPropertyName("remainingInterest")] public decimal? RemainingInterest { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRate.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRate.cs index ae1c21ecd..95f16895f 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRate.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRate.cs @@ -8,22 +8,22 @@ public record BinanceCryptoLoanRepayRate /// /// Loan asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// Collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// Repay quantity /// - [JsonProperty("repayAmount")] + [JsonPropertyName("repayAmount")] public decimal RepayQuantity { get; set; } /// /// Rate /// - [JsonProperty("rate")] + [JsonPropertyName("rate")] public decimal Rate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRecord.cs b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRecord.cs index 6358b6f63..079e1ae31 100644 --- a/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRecord.cs +++ b/Binance.Net/Objects/Models/Spot/Loans/BinanceCryptoLoanRepayRecord.cs @@ -10,43 +10,49 @@ public record BinanceCryptoLoanRepayRecord /// /// The loaning asset /// - [JsonProperty("loanCoin")] + [JsonPropertyName("loanCoin")] public string LoanAsset { get; set; } = string.Empty; /// /// The collateral asset /// - [JsonProperty("collateralCoin")] + [JsonPropertyName("collateralCoin")] public string CollateralAsset { get; set; } = string.Empty; /// /// Borrow order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// Repay timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("repayTime")] public DateTime RepayTime { get; set; } /// /// Status of the repay /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("repayStatus")] public BorrowStatus RepayStatus { get; set; } /// /// Collateral return /// + [JsonPropertyName("collateralReturn")] public decimal CollateralReturn { get; set; } /// /// Collateral used /// + [JsonPropertyName("collateralUsed")] public decimal CollateralUsed { get; set; } /// /// Repay quantity /// - [JsonProperty("repayAmount")] + [JsonPropertyName("repayAmount")] public decimal RepayQuantity { get; set; } /// /// 1 for "repay with borrowed asset", 2 for "repay with collateral" /// + [JsonPropertyName("repayType")] public int RepayType { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginCollateralRatio.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginCollateralRatio.cs index 0b37867ca..0c7c7157a 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginCollateralRatio.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginCollateralRatio.cs @@ -8,10 +8,12 @@ public record BinanceCrossMarginCollateralRatio /// /// Collaterals /// + [JsonPropertyName("collaterals")] public IEnumerable Collaterals { get; set; } = Array.Empty(); /// /// Asset names /// + [JsonPropertyName("assetNames")] public IEnumerable AssetNames { get; set; } = Array.Empty(); } @@ -23,14 +25,17 @@ public record BinanceCrossMarginCollateral /// /// Min usd value /// + [JsonPropertyName("minUsdValue")] public decimal MinUsdValue { get; set; } /// /// Max usd value /// + [JsonPropertyName("maxUsdValue")] public decimal? MaxUsdValue { get; set; } /// /// Discount rate /// + [JsonPropertyName("discountRate")] public decimal DiscountRate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginLeverageResult.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginLeverageResult.cs index fb51ce374..baa3eda72 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginLeverageResult.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceCrossMarginLeverageResult.cs @@ -8,6 +8,7 @@ public record BinanceCrossMarginLeverageResult /// /// Success /// + [JsonPropertyName("success")] public bool Success { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceForcedLiquidation.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceForcedLiquidation.cs index 81d6c9c6c..c3f4d0b0a 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceForcedLiquidation.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceForcedLiquidation.cs @@ -11,49 +11,53 @@ public record BinanceForcedLiquidation /// /// Average price /// - [JsonProperty("avgPrice")] + [JsonPropertyName("avgPrice")] public decimal AveragePrice { get; set; } /// /// The executed quantity /// - [JsonProperty("executedQty")] + [JsonPropertyName("executedQty")] public decimal ExecutedQuantity { get; set; } /// /// Order id /// + [JsonPropertyName("orderId")] public long OrderId { get; set; } /// /// Price /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// Total quantity /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// Side /// - [JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("side")] public OrderSide Side { get; set; } /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Time in force /// - [JsonConverter(typeof(TimeInForceConverter))] + [JsonPropertyName("timeInForce")] public TimeInForce TimeInForce { get; set; } /// /// Last update time /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("updatedTime")] + [JsonPropertyName("updatedTime")] public DateTime UpdateTime { get; set; } /// /// Is isolated margin /// + [JsonPropertyName("isIsolated")] public bool IsIsolated { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceFuturesInterestRate.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceFuturesInterestRate.cs index 707dac856..49bf9558e 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceFuturesInterestRate.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceFuturesInterestRate.cs @@ -8,12 +8,12 @@ public record BinanceFuturesInterestRate /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Next interest rate /// - [JsonProperty("nextHourlyInterestRate")] + [JsonPropertyName("nextHourlyInterestRate")] public decimal NextHourlyInterestRate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestHistoryResult.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestHistoryResult.cs index a6ca7f1eb..f228943a2 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestHistoryResult.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestHistoryResult.cs @@ -8,41 +8,48 @@ public record BinanceInterestHistory /// /// Transaction id /// - [JsonProperty("txId")] - public string? TransactionId { get; set; } + [JsonPropertyName("txId")] + public long? TransactionId { get; set; } /// /// Isolated symbol /// + [JsonPropertyName("isolatedSymbol")] public string? IsolatedSymbol { get; set; } /// /// The asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The raw asset /// + [JsonPropertyName("rawAsset")] public string? RawAsset { get; set; } /// /// The quantity of interest /// - [JsonProperty("interest")] + [JsonPropertyName("interest")] public decimal InterestQuantity { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("interestAccuredTime")] public DateTime InterestAccuredTime { get; set; } /// /// Interest rate /// + [JsonPropertyName("interestRate")] public decimal InterestRate { get; set; } /// /// Principal /// + [JsonPropertyName("principal")] public decimal Principal { get; set; } /// /// Type of interest /// + [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestMarginData.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestMarginData.cs index 08b1f0c1a..e737fb8de 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestMarginData.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestMarginData.cs @@ -8,49 +8,49 @@ public record BinanceInterestMarginData /// /// Vip level /// - [JsonProperty("vipLevel")] - public string VipLevel { get; set; } = string.Empty; + [JsonPropertyName("vipLevel")] + public int VipLevel { get; set; } /// /// The coin /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Coin { get; set; } = string.Empty; /// /// If coin can be transferred into cross /// - [JsonProperty("transferIn")] + [JsonPropertyName("transferIn")] public bool TransferIn { get; set; } = false; /// /// If coin can be borrowed in cross /// - [JsonProperty("borrowable")] + [JsonPropertyName("borrowable")] public bool Borrowable { get; set; } = false; /// /// The daily interest /// - [JsonProperty("dailyInterest")] + [JsonPropertyName("dailyInterest")] public decimal DailyInterest { get; set; } /// /// The yearly interest /// - [JsonProperty("yearlyInterest")] + [JsonPropertyName("yearlyInterest")] public decimal YearlyInterest { get; set; } /// /// The yearly interest /// - [JsonProperty("borrowLimit")] + [JsonPropertyName("borrowLimit")] public decimal BorrowLimit { get; set; } /// /// Cross marginable pairs for this coin /// - [JsonProperty("marginablePairs")] + [JsonPropertyName("marginablePairs")] public string[]? MarginablePairs { get; set; } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestRateHistory.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestRateHistory.cs index 3c57ec3d6..e638e3279 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestRateHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceInterestRateHistory.cs @@ -8,20 +8,23 @@ public record BinanceInterestRateHistory /// /// The asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The daily interest /// - [JsonProperty("dailyInterestRate")] + [JsonPropertyName("dailyInterestRate")] public decimal DailyInterest { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } /// /// Vip level /// - public string VipLevel { get; set; } = string.Empty; + [JsonPropertyName("vipLevel")] + public int VipLevel { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginFeeData.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginFeeData.cs index 9c9dbb9c2..5b28da490 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginFeeData.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginFeeData.cs @@ -8,22 +8,22 @@ public record BinanceIsolatedMarginFeeData /// /// Vip level /// - [JsonProperty("vipLevel")] + [JsonPropertyName("vipLevel")] public int VipLevel { get; set; } /// /// Symbol /// - [JsonProperty("symbol")] + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Leverage /// - [JsonProperty("leverage")] + [JsonPropertyName("leverage")] public int Leverage { get; set; } /// /// Data /// - [JsonProperty("data")] + [JsonPropertyName("data")] public IEnumerable FeeInfo { get; set; } = Array.Empty(); } @@ -35,17 +35,17 @@ public record BinanceIsolatedMarginFeeInfo /// /// Asset /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Daily interest /// - [JsonProperty("dailyInterest")] + [JsonPropertyName("dailyInterest")] public decimal DailyInterest { get; set; } /// /// Borrow limit /// - [JsonProperty("borrowLimit")] + [JsonPropertyName("borrowLimit")] public decimal BorrowLimit { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginTierData.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginTierData.cs index 46b4d6c7d..844f18d28 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginTierData.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceIsolatedMarginTierData.cs @@ -8,30 +8,37 @@ public record BinanceIsolatedMarginTierData /// /// Average price /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Tier /// + [JsonPropertyName("tier")] public int Tier { get; set; } /// /// Effective multiple /// + [JsonPropertyName("effectiveMultiple")] public decimal EffectiveMultiple { get; set; } /// /// Initial risk ratio /// + [JsonPropertyName("initialRiskRatio")] public decimal InitialRiskRatio { get; set; } /// /// Liquidation risk ratio /// + [JsonPropertyName("liquidationRiskRatio")] public decimal LiquidationRiskRatio { get; set; } /// /// Base asset max borrowable /// + [JsonPropertyName("baseAssetMaxBorrowable")] public decimal BaseAssetMaxBorrowable { get; set; } /// /// Quote asset max borrowable /// + [JsonPropertyName("quoteAssetMaxBorrowable")] public decimal QuoteAssetMaxBorrowable { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccount.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccount.cs index def9cc3e0..8449d3bc8 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccount.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccount.cs @@ -8,48 +8,57 @@ public record BinanceMarginAccount /// /// Boolean indicating if this account can borrow /// + [JsonPropertyName("borrowEnabled")] public bool BorrowEnabled { get; set; } /// /// Boolean indicating if this account can trade /// + [JsonPropertyName("tradeEnabled")] public bool TradeEnabled { get; set; } /// /// Boolean indicating if this account can transfer /// + [JsonPropertyName("transferEnabled")] public bool TransferEnabled { get; set; } /// /// Collateral margin level /// + [JsonPropertyName("collateralMarginLevel")] public decimal? CollateralMarginLevel { get; set; } /// /// Total collateral value in USDT /// + [JsonPropertyName("totalCollateralValueInUSDT")] public decimal? TotalCollateralValueInUSDT { get; set; } /// /// Aggregate level of margin /// + [JsonPropertyName("marginLevel")] public decimal MarginLevel { get; set; } /// /// Aggregate total balance as BTC /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } /// /// Aggregate total liability balance of BTC /// + [JsonPropertyName("totalLiabilityOfBtc")] public decimal TotalLiabilityOfBtc { get; set; } /// /// Aggregate total available net balance of BTC /// + [JsonPropertyName("totalNetAssetOfBtc")] public decimal TotalNetAssetOfBtc { get; set; } /// /// Account type /// - [JsonProperty("accountType")] + [JsonPropertyName("accountType")] public string AccountType { get; set; } = string.Empty; /// /// Balance list /// - [JsonProperty("userAssets")] + [JsonPropertyName("userAssets")] public IEnumerable Balances { get; set; } = Array.Empty(); } @@ -61,27 +70,32 @@ public record BinanceMarginBalance /// /// The asset this balance is for /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The quantity that was borrowed /// + [JsonPropertyName("borrowed")] public decimal Borrowed { get; set; } /// /// The quantity that isn't locked in a trade /// - [JsonProperty("free")] + [JsonPropertyName("free")] public decimal Available { get; set; } /// /// Fee to need pay by borrowed /// + [JsonPropertyName("interest")] public decimal Interest { get; set; } /// /// The quantity that is currently locked in a trade /// + [JsonPropertyName("locked")] public decimal Locked { get; set; } /// /// The quantity that is netAsset /// + [JsonPropertyName("netAsset")] public decimal NetAsset { get; set; } /// /// The total balance of this asset (Available + Locked) diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccountSnapshot.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccountSnapshot.cs index 9cfd9daa5..2ea69e10d 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccountSnapshot.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAccountSnapshot.cs @@ -10,17 +10,18 @@ public record BinanceMarginAccountSnapshot /// /// Timestamp of the data /// - [JsonConverter(typeof(DateTimeConverter)), JsonProperty("updateTime")] + [JsonConverter(typeof(DateTimeConverter)), JsonPropertyName("updateTime")] public DateTime Timestamp { get; set; } /// /// Account type the data is for /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("type")] public AccountType Type { get; set; } /// /// Snapshot data /// - [JsonProperty("data")] + [JsonPropertyName("data")] public BinanceMarginAccountSnapshotData Data { get; set; } = default!; } @@ -32,23 +33,28 @@ public record BinanceMarginAccountSnapshotData /// /// The margin level /// + [JsonPropertyName("marginLevel")] public decimal MarginLevel { get; set; } /// /// Total BTC asset /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } /// /// Total BTC liability /// + [JsonPropertyName("totalLiabilityOfBtc")] public decimal TotalLiabilityOfBtc { get; set; } /// /// Total net BTC asset /// + [JsonPropertyName("totalNetAssetOfBtc")] public decimal TotalNetAssetOfBtc { get; set; } /// /// Assets /// + [JsonPropertyName("userAssets")] public IEnumerable UserAssets { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAmount.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAmount.cs index 1f863c173..4ea84996e 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAmount.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAmount.cs @@ -8,12 +8,13 @@ public record BinanceMarginAmount /// /// The quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// The borrow limit /// + [JsonPropertyName("borrowLimit")] public decimal BorrowLimit { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAsset.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAsset.cs index 3da7d3f30..c509357e7 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAsset.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginAsset.cs @@ -8,35 +8,37 @@ public record BinanceMarginAsset /// /// Full name of the asset /// - [JsonProperty("assetFullName")] + [JsonPropertyName("assetFullName")] public string FullName { get; set; } = string.Empty; /// /// Short name of the asset /// - [JsonProperty("assetName")] + [JsonPropertyName("assetName")] public string Name { get; set; } = string.Empty; /// /// Is borrowable /// + [JsonPropertyName("isBorrowable")] public bool IsBorrowable { get; set; } /// /// Is mortgageable /// + [JsonPropertyName("isMortgageable")] public bool IsMortgageable { get; set; } /// /// Minimal quantity which can be borrowed /// - [JsonProperty("userMinBorrow")] + [JsonPropertyName("userMinBorrow")] public decimal MinimalBorrowQuantity { get; set; } /// /// Minimal quantity which can be repaid /// - [JsonProperty("userMinRepay")] + [JsonPropertyName("userMinRepay")] public decimal MinimalRepayQuanitty { get; set; } /// /// Time at which the asset gets delisted /// - [JsonProperty("delistTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("delistTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime? DelistTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDelistSchedule.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDelistSchedule.cs index c4da89cbe..f57a8668b 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDelistSchedule.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDelistSchedule.cs @@ -8,16 +8,18 @@ public record BinanceMarginDelistSchedule /// /// Delist time /// - [JsonProperty("delistTime")] + [JsonPropertyName("delistTime")] [JsonConverter(typeof(DateTimeConverter))] public DateTime DelistTime { get; set; } /// /// Cross margin assets /// + [JsonPropertyName("crossMarginAssets")] public IEnumerable CrossMarginAssets { get; set; } = Array.Empty(); /// /// Isolated margin symbols /// + [JsonPropertyName("isolatedMarginSymbols")] public IEnumerable IsolatedMarginSymbols { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustAsset.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustAsset.cs index e49d3c199..b95e87fc1 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustAsset.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustAsset.cs @@ -8,18 +8,22 @@ public record BinanceMarginDustAsset /// /// Total btc /// + [JsonPropertyName("totalTransferBtc")] public decimal TotalTransferBtc { get; set; } /// /// Total bnb /// + [JsonPropertyName("totalTransferBNB")] public decimal TotalTransferBnb { get; set; } /// /// Dribblet percentage /// + [JsonPropertyName("dribbletPercentage")] public decimal DribbletPercentage { get; set; } /// /// Details /// + [JsonPropertyName("details")] public IEnumerable Details { get; set; } = Array.Empty(); } @@ -31,37 +35,37 @@ public record BinanceMarginDustAssetDetails /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Asset full name /// - [JsonProperty("assetFullName")] + [JsonPropertyName("assetFullName")] public string AssetFullName { get; set; } = string.Empty; /// /// Quantity fee /// - [JsonProperty("amountFree")] + [JsonPropertyName("amountFree")] public decimal QuantityFree { get; set; } /// /// To btc /// - [JsonProperty("toBTC")] + [JsonPropertyName("toBTC")] public decimal ToBtc { get; set; } /// /// To bnb /// - [JsonProperty("toBNB")] + [JsonPropertyName("toBNB")] public decimal ToBnb { get; set; } /// /// To bnb off exchange /// - [JsonProperty("toBNBOffExchange")] + [JsonPropertyName("toBNBOffExchange")] public decimal ToBnbOffExchange { get; set; } /// /// Exchange /// - [JsonProperty("exchange")] + [JsonPropertyName("exchange")] public decimal Exchange { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustTransfer.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustTransfer.cs index 1e6a65d7b..de5298b35 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustTransfer.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginDustTransfer.cs @@ -8,17 +8,17 @@ public record BinanceMarginDustTransfer /// /// Total service charge /// - [JsonProperty("totalServiceCharge")] + [JsonPropertyName("totalServiceCharge")] public decimal TotalServiceCharge { get; set; } /// /// Total transfered /// - [JsonProperty("totalTransfered")] + [JsonPropertyName("totalTransfered")] public decimal TotalTransfered { get; set; } /// /// Transfer results /// - [JsonProperty("transferResult")] + [JsonPropertyName("transferResult")] public IEnumerable TransferResults { get; set; } = Array.Empty(); } @@ -30,33 +30,33 @@ public record BinanceMargingDustTransferResult /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Source asset /// - [JsonProperty("fromAsset")] + [JsonPropertyName("fromAsset")] public string FromAsset { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("operateTime")] + [JsonPropertyName("operateTime")] [JsonConverter(typeof(DateTimeConverter))] public DateTime OperateTime { get; set; } /// /// Service charge quantity /// - [JsonProperty("serviceChargeAmount")] + [JsonPropertyName("serviceChargeAmount")] public decimal ServiceChargeQuantity { get; set; } /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// Transfered quantity /// - [JsonProperty("transferedAmount")] + [JsonPropertyName("transferedAmount")] public decimal TransferedQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginLevel.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginLevel.cs index 9c902a438..18f3c5354 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginLevel.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginLevel.cs @@ -8,17 +8,17 @@ public record BinanceMarginLevel /// /// The level at which your margin level is considered normal. /// - [JsonProperty("normalBar")] + [JsonPropertyName("normalBar")] public double NormalLevel { get; set; } = 0.0; /// /// The level at which you will be margin called (asked to deposit more funds) /// - [JsonProperty("marginCallBar")] + [JsonPropertyName("marginCallBar")] public double MarginCallLevel { get; set; } = 0.0; /// /// The level at which your positions will be liquidated until your account balances /// - [JsonProperty("forceLiquidationBar")] + [JsonPropertyName("forceLiquidationBar")] public double ForcedLiquidationLevel { get; set; } = 0.0; } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginOrderOcoList.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginOrderOcoList.cs index 5d3eb8bda..b4de40f18 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginOrderOcoList.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginOrderOcoList.cs @@ -8,15 +8,17 @@ public record BinanceMarginOrderOcoList: BinanceOrderOcoList /// /// Margin buy borrow quantity /// - [JsonProperty("marginBuyBorrowAmount")] + [JsonPropertyName("marginBuyBorrowAmount")] public decimal? MarginBuyBorrowQuantity { get; set; } /// /// Margin buy borrow asset /// + [JsonPropertyName("marginBuyBorrowAsset")] public string? MarginBuyBorrowAsset { get; set; } /// /// Is isolated margin /// + [JsonPropertyName("isIsolated")] public bool IsIsolated { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPair.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPair.cs index 4d6389abe..de7a1e503 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPair.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPair.cs @@ -8,37 +8,42 @@ public record BinanceMarginPair /// /// Base asset of the pair /// - [JsonProperty("base")] + [JsonPropertyName("base")] public string BaseAsset { get; set; } = string.Empty; /// /// Quote asset of the pair /// - [JsonProperty("quote")] + [JsonPropertyName("quote")] public string QuoteAsset { get; set; } = string.Empty; /// /// Id /// + [JsonPropertyName("id")] public long Id { get; set; } /// /// Is buying allowed /// + [JsonPropertyName("isBuyAllowed")] public bool IsBuyAllowed { get; set; } /// /// Is selling allowed /// + [JsonPropertyName("isSellAllowed")] public bool IsSellAllowed { get; set; } /// /// Is margin trading /// + [JsonPropertyName("isMarginTrade")] public bool IsMarginTrade { get; set; } /// /// Symbol name /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Time at which the symbol gets delisted /// - [JsonProperty("delistTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("delistTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime? DelistTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPriceIndex.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPriceIndex.cs index bd544fade..e9ce5fb7b 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPriceIndex.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginPriceIndex.cs @@ -8,15 +8,17 @@ public record BinanceMarginPriceIndex /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Price /// + [JsonPropertyName("price")] public decimal Price { get; set; } /// /// Time of calculation /// - [JsonProperty("calcTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("calcTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime CalculationTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginTransaction.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginTransaction.cs index c9a5ab231..e999fc93e 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginTransaction.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceMarginTransaction.cs @@ -8,7 +8,7 @@ public record BinanceTransaction /// /// The Transaction id as assigned by Binance /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryLoan.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryLoan.cs index 4d0407218..6cf49eec0 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryLoan.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryLoan.cs @@ -11,38 +11,42 @@ public record BinanceLoan /// /// Isolated symbol /// + [JsonPropertyName("isolatedSymbol")] public string? IsolatedSymbol { get; set; } /// /// The asset of the loan /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The transaction id of the loan /// - [JsonProperty("txId")] + [JsonPropertyName("txId")] public long TransactionId { get; set; } /// /// Principal repaid /// + [JsonPropertyName("principal")] public decimal Principal { get; set; } /// /// Interest repaid /// + [JsonPropertyName("interest")] public decimal Interest { get; set; } /// /// Quantity repaid /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Time of repay completed /// - [JsonProperty("timestamp"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// The status of the loan /// - [JsonConverter(typeof(MarginStatusConverter))] + [JsonPropertyName("status")] public MarginStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryRepay.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryRepay.cs index b11966092..f7f4a0328 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryRepay.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceQueryRepay.cs @@ -11,38 +11,42 @@ public record BinanceRepay /// /// Isolated symbol /// + [JsonPropertyName("isolatedSymbol")] public string? IsolatedSymbol { get; set; } /// /// The asset of the repay /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The transaction id of the repay /// ` - [JsonProperty("txId")] + [JsonPropertyName("txId")] public long TransactionId { get; set; } /// /// Total quantity repaid /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Interest repaid /// + [JsonPropertyName("interest")] public decimal Interest { get; set; } /// /// Principal repaid /// + [JsonPropertyName("principal")] public decimal Principal { get; set; } /// /// Time of repay completed /// - [JsonProperty("timestamp"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// The status of the repay /// - [JsonProperty("status"), JsonConverter(typeof(MarginStatusConverter))] + [JsonPropertyName("status")] public MarginStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityAsset.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityAsset.cs index 2b943790a..f92a6d7fd 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityAsset.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityAsset.cs @@ -8,27 +8,27 @@ public record BinanceSmallLiabilityAsset /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Interest /// - [JsonProperty("interest")] + [JsonPropertyName("interest")] public decimal Interest { get; set; } /// /// Principal /// - [JsonProperty("principal")] + [JsonPropertyName("principal")] public decimal Principal { get; set; } /// /// Liability asset /// - [JsonProperty("liabilityAsset")] + [JsonPropertyName("liabilityAsset")] public string LiabilityAsset { get; set; } = string.Empty; /// /// Liability quantity /// - [JsonProperty("liabilityQty")] + [JsonPropertyName("liabilityQty")] public decimal LiabilityQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityHistory.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityHistory.cs index 4aff1f107..dddf8a279 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceSmallLiabilityHistory.cs @@ -8,32 +8,32 @@ public record BinanceSmallLiabilityHistory /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Target asset /// - [JsonProperty("targetAsset")] + [JsonPropertyName("targetAsset")] public string TargetAsset { get; set; } = string.Empty; /// /// Target quantity /// - [JsonProperty("targetAmount")] + [JsonPropertyName("targetAmount")] public decimal TargetQuantity { get; set; } /// /// Biz type /// - [JsonProperty("bizType")] + [JsonPropertyName("bizType")] public string BizType { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("timestamp")] + [JsonPropertyName("timestamp")] [JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } diff --git a/Binance.Net/Objects/Models/Spot/Margin/BinanceTransferHistory.cs b/Binance.Net/Objects/Models/Spot/Margin/BinanceTransferHistory.cs index 7d8b4a8de..3c3be529f 100644 --- a/Binance.Net/Objects/Models/Spot/Margin/BinanceTransferHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Margin/BinanceTransferHistory.cs @@ -11,50 +11,53 @@ public record BinanceTransferHistory /// /// Quanity of the transfer /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset of the transfer /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Status of the transfer /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Timestamp of the transaction /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } /// /// Transaction id /// - [JsonProperty("txId")] + [JsonPropertyName("txId")] public decimal TransactionId { get; set; } /// /// Direction of the transfer /// - [JsonProperty("type"), JsonConverter(typeof(TransferDirectionConverter))] + [JsonPropertyName("type")] public TransferDirection Direction { get; set; } /// /// Transfer from /// - [JsonProperty("transFrom")] + [JsonPropertyName("transFrom")] public string TransferFrom { get; set; } = string.Empty; /// /// Transfer to /// - [JsonProperty("transTo")] + [JsonPropertyName("transTo")] public string TransferTo { get; set; } = string.Empty; /// /// Transfer from symbol /// - [JsonProperty("fromSymbol")] + [JsonPropertyName("fromSymbol")] public string? FromSymbol { get; set; } = string.Empty; /// /// Transfer to symbol /// - [JsonProperty("toSymbol")] + [JsonPropertyName("toSymbol")] public string? ToSymbol { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleDetails.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleDetails.cs index f9dd04638..68397d1de 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleDetails.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleDetails.cs @@ -8,14 +8,17 @@ public record BinanceHashrateResaleDetails /// /// Total number of results /// + [JsonPropertyName("totalNum")] public int TotalNum { get; set; } /// /// Page size /// + [JsonPropertyName("pageSize")] public int PageSize { get; set; } /// /// Transfer details /// + [JsonPropertyName("profitTransferDetails")] public IEnumerable ProfitTransferDetails { get; set; } = Array.Empty(); } @@ -27,37 +30,43 @@ public record BinanceHashrateResaleDetailsItem /// /// Config id /// + [JsonPropertyName("configId")] public long ConfigId { get; set; } /// /// From user /// + [JsonPropertyName("poolUsername")] public string PoolUserName { get; set; } = string.Empty; /// /// To user /// + [JsonPropertyName("toPoolUsername")] public string ToPoolUserName { get; set; } = string.Empty; /// /// Algorithm /// + [JsonPropertyName("alsoName")] public string AlgoName { get; set; } = string.Empty; /// /// Hash rate /// + [JsonPropertyName("hashRate")] public decimal Hashrate { get; set; } /// /// Start day /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("day")] public DateTime Day { get; set; } /// /// Coin name /// - [JsonProperty("coinName")] + [JsonPropertyName("coinName")] public string Coin { get; set; } = string.Empty; /// /// Transferred income /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleList.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleList.cs index 89206055c..c5e10a606 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleList.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceHashrateResaleList.cs @@ -19,7 +19,7 @@ public record BinanceHashrateResaleList /// /// Details /// - [JsonProperty("configDetails")] + [JsonPropertyName("configDetails")] public IEnumerable ResaleItmes { get; set; } = Array.Empty(); } @@ -31,38 +31,45 @@ public record BinanceHashrateResaleItem /// /// Mining id /// + [JsonPropertyName("configId")] public int ConfigId { get; set; } /// /// From user /// + [JsonPropertyName("poolUsername")] public string PoolUserName { get; set; } = string.Empty; /// /// To user /// + [JsonPropertyName("toPoolUsername")] public string ToPoolUserName { get; set; } = string.Empty; /// /// Algorithm /// + [JsonPropertyName("algoName")] public string AlgoName { get; set; } = string.Empty; /// /// Hash rate /// + [JsonPropertyName("hashRate")] public decimal Hashrate { get; set; } /// /// Start day /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("startDay")] public DateTime StartDay { get; set; } /// /// End day /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("endDay")] public DateTime EndDay { get; set; } /// /// Status /// - [JsonConverter(typeof(HashrateResaleStatusConverter))] + [JsonPropertyName("status")] public HashrateResaleStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiner.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiner.cs index e45c67a8f..d3511d69f 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiner.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiner.cs @@ -30,32 +30,38 @@ public record BinanceMinerInfo /// /// Worker id /// + [JsonPropertyName("workerId")] public string WorkerId { get; set; } = string.Empty; /// /// Worker name /// + [JsonPropertyName("workerName")] public string WorkerName { get; set; } = string.Empty; /// /// Status /// - [JsonConverter(typeof(MinerStatusConverter))] + [JsonPropertyName("status")] public MinerStatus Status { get; set; } /// /// Hash rate /// + [JsonPropertyName("hashRate")] public decimal HashRate { get; set; } /// /// Day hash rate /// + [JsonPropertyName("dayHashRate")] public decimal DayHashRate { get; set; } /// /// Reject rate /// + [JsonPropertyName("rejectRate")] public decimal RejectRate { get; set; } /// /// Last share time /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("lastShareTime")] public DateTime LastShareTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceMinerDetails.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceMinerDetails.cs index 4d5ff89ca..4266f869a 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceMinerDetails.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceMinerDetails.cs @@ -8,15 +8,18 @@ public record BinanceMinerDetails /// /// Name of the worker /// + [JsonPropertyName("workerName")] public string WorkerName { get; set; } = string.Empty; /// /// Data type /// + [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; /// /// Hash rate data /// + [JsonPropertyName("hashRateDatas")] public IEnumerable HashRateDatas { get; set; } = Array.Empty(); } @@ -29,15 +32,17 @@ public record BinanceHashRate /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Hashrate /// + [JsonPropertyName("hashRate")] public decimal HashRate { get; set; } /// /// Rejected /// + [JsonPropertyName("reject")] public decimal Reject { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAccount.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAccount.cs index 8d0805d10..c079a6ead 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAccount.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAccount.cs @@ -8,15 +8,17 @@ public record BinanceMiningAccount /// /// Type /// + [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; /// /// User name /// + [JsonPropertyName("userName")] public string UserName { get; set; } = string.Empty; /// /// Hash rates /// - [JsonProperty("list")] + [JsonPropertyName("list")] public IEnumerable Hashrates { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAlgorithm.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAlgorithm.cs index eae8c2e60..2067da947 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAlgorithm.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningAlgorithm.cs @@ -8,21 +8,23 @@ public record BinanceMiningAlgorithm /// /// The name of the algorithm /// - [JsonProperty("algoName")] + [JsonPropertyName("algoName")] public string AlgorithmName { get; set; } = string.Empty; /// /// The id of the algorithm /// - [JsonProperty("algoId")] + [JsonPropertyName("algoId")] public string AlgorithmId { get; set; } = string.Empty; /// /// The pool index /// + [JsonPropertyName("poolIndex")] public int PoolIndex { get; set; } /// /// The unit of measurement /// + [JsonPropertyName("unit")] public string Unit { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningCoin.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningCoin.cs index a3aca6760..aef8dc2d5 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningCoin.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningCoin.cs @@ -8,27 +8,28 @@ public record BinanceMiningCoin /// /// The name of the coin /// - [JsonProperty("coinName")] + [JsonPropertyName("coinName")] public string CoinName { get; set; } = string.Empty; /// /// The id of the coin /// - [JsonProperty("coinId")] + [JsonPropertyName("coinId")] public string CoinId { get; set; } = string.Empty; /// /// The pool index /// + [JsonPropertyName("poolIndex")] public int PoolIndex { get; set; } /// /// Algorithm id /// - [JsonProperty("algoId")] + [JsonPropertyName("algoId")] public string AlgorithmId { get; set; } = string.Empty; /// /// Algorithm name /// - [JsonProperty("algoName")] + [JsonPropertyName("algoName")] public string AlgorithmName { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningEarning.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningEarning.cs index 706d2cf05..94d8aaedd 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningEarning.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningEarning.cs @@ -11,14 +11,17 @@ public record BinanceMiningEarnings /// /// Total number of results /// + [JsonPropertyName("totalNum")] public int TotalNum { get; set; } /// /// Page size /// + [JsonPropertyName("pageSize")] public int PageSize { get; set; } /// /// Profit items /// + [JsonPropertyName("accountProfits")] public IEnumerable AccountProfits { get; set; } = Array.Empty(); } @@ -31,33 +34,32 @@ public record BinanceMiningAccountEarning /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Coin /// - [JsonProperty("coinName")] + [JsonPropertyName("coinName")] public string Coin { get; set; } = string.Empty; /// /// Earning type /// - [JsonConverter(typeof(BinanceEarningTypeConverter))] - [JsonProperty("type")] - public BinanceEarningType Type { get; set; } + [JsonPropertyName("type")] + public EarningType Type { get; set; } /// /// Sub account id /// - [JsonProperty("puid")] + [JsonPropertyName("puid")] public long? SubAccountId { get; set; } /// /// Mining account /// - [JsonProperty("subName")] + [JsonPropertyName("subName")] public string SubName { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningStatistic.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningStatistic.cs index 0641226f3..e810d29f4 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningStatistic.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceMiningStatistic.cs @@ -8,42 +8,47 @@ public record BinanceMiningStatistic /// /// Hashrate last fifteen minutes /// - [JsonProperty("fifteenMinHashRate")] + [JsonPropertyName("fifteenMinHashRate")] public decimal FifteenMinuteHashRate { get; set; } /// /// Day hashrate /// + [JsonPropertyName("dayHashRate")] public decimal DayHashRate { get; set; } /// /// Valid shares /// - [JsonProperty("validNum")] + [JsonPropertyName("validNum")] public int ValidShares { get; set; } /// /// Invalid shares /// - [JsonProperty("invalidNum")] + [JsonPropertyName("invalidNum")] public int InvalidShares { get; set; } /// /// Todays profit /// + [JsonPropertyName("profitToday")] public Dictionary ProfitToday { get; set; } = new Dictionary(); /// /// Yesterdays profit /// + [JsonPropertyName("profitYesterday")] public Dictionary ProfitYesterday { get; set; } = new Dictionary(); /// /// User name /// + [JsonPropertyName("userName")] public string UserName { get; set; } = string.Empty; /// /// Hashrate unit /// + [JsonPropertyName("unit")] public string Unit { get; set; } = string.Empty; /// /// Algorithm /// - [JsonProperty("algo")] + [JsonPropertyName("algo")] public string Algorithm { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceOtherRevenueList.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceOtherRevenueList.cs index 64f1834e7..254d044ec 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceOtherRevenueList.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceOtherRevenueList.cs @@ -11,14 +11,17 @@ public record BinanceOtherRevenueList /// /// Total number of results /// + [JsonPropertyName("totalName")] public int TotalNum { get; set; } /// /// Page size /// + [JsonPropertyName("pageSize")] public int PageSize { get; set; } /// /// Revenue items /// + [JsonPropertyName("otherProfits")] public IEnumerable OtherProfits { get; set; } = Array.Empty(); } @@ -31,26 +34,27 @@ public record BinanceOtherRevenueItem /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Coin /// - [JsonProperty("coinName")] + [JsonPropertyName("coinName")] public string Coin { get; set; } = string.Empty; /// /// Earning type /// - [JsonConverter(typeof(BinanceEarningTypeConverter))] - public BinanceEarningType Type { get; set; } + [JsonPropertyName("type")] + public EarningType Type { get; set; } /// /// Profit quantity /// - [JsonProperty("profitAmount")] + [JsonPropertyName("profitAmount")] public decimal ProfitQuantity { get; set; } /// /// Status /// + [JsonPropertyName("status")] public MinerStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Mining/BinanceRevenueList.cs b/Binance.Net/Objects/Models/Spot/Mining/BinanceRevenueList.cs index 6ad075e0b..abecf5ec1 100644 --- a/Binance.Net/Objects/Models/Spot/Mining/BinanceRevenueList.cs +++ b/Binance.Net/Objects/Models/Spot/Mining/BinanceRevenueList.cs @@ -11,14 +11,17 @@ public record BinanceRevenueList /// /// Total number of results /// + [JsonPropertyName("totalNum")] public int TotalNum { get; set; } /// /// Page size /// + [JsonPropertyName("pageSize")] public int PageSize { get; set; } /// /// Revenue items /// + [JsonPropertyName("accountProfits")] public IEnumerable AccountProfits { get; set; } = Array.Empty(); } @@ -31,39 +34,42 @@ public record BinanceRevenueItem /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// Coin /// - [JsonProperty("coinName")] + [JsonPropertyName("coinName")] public string Coin { get; set; } = string.Empty; /// /// Earning type /// - [JsonConverter(typeof(BinanceEarningTypeConverter))] - public BinanceEarningType Type { get; set; } + [JsonPropertyName("type")] + public EarningType Type { get; set; } /// /// Day hashrate /// + [JsonPropertyName("dayHashRate")] public decimal DayHashRate { get; set; } /// /// Profit quantity /// - [JsonProperty("profitAmount")] + [JsonPropertyName("profitAmount")] public decimal ProfitQuantity { get; set; } /// /// Hash transfer /// + [JsonPropertyName("hashTransfer")] public decimal? HashTransfer { get; set; } /// /// Transfer quantity /// - [JsonProperty("transferAmount")] + [JsonPropertyName("transferAmount")] public decimal? TransferQuantity { get; set; } /// /// Status /// + [JsonPropertyName("status")] public MinerStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginCollateralRate.cs b/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginCollateralRate.cs index 30abdf35a..c1b5fe434 100644 --- a/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginCollateralRate.cs +++ b/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginCollateralRate.cs @@ -8,11 +8,13 @@ public record BinancePortfolioMarginCollateralRate /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Collateral rate /// + [JsonPropertyName("collateralRate")] public decimal CollateralRate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginInfo.cs b/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginInfo.cs index d4e417c1f..a3d9373aa 100644 --- a/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginInfo.cs +++ b/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginInfo.cs @@ -10,31 +10,33 @@ public record BinancePortfolioMarginInfo /// /// Portfolio margin account maintenance margin rate /// - [JsonProperty("uniMMR")] + [JsonPropertyName("uniMMR")] public decimal UniMaintenanceMarginRate { get; set; } /// /// Account equity, in USD /// + [JsonPropertyName("accountEquity")] public decimal AccountEquity { get; set; } /// /// Portfolio margin account actual equity, in USD /// - [JsonProperty("actualEquity")] + [JsonPropertyName("actualEquity")] public decimal ActualEquity { get; set; } /// /// Portfolio margin account maintenance margin, in USD /// - [JsonProperty("accountMaintMargin")] + [JsonPropertyName("accountMaintMargin")] public decimal AccountMaintenanceMargin { get; set; } /// /// Account status /// [JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("accountStatus")] public PortfolioMarginAccountStatus AccountStatus { get; set; } /// /// Account type /// - [JsonProperty("accountType")] + [JsonPropertyName("accountType")] public string AccountType { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginLoan.cs b/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginLoan.cs index 8f66b262c..7426bdbd8 100644 --- a/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginLoan.cs +++ b/Binance.Net/Objects/Models/Spot/PortfolioMargin/BinancePortfolioMarginLoan.cs @@ -8,11 +8,12 @@ public record BinancePortfolioMarginLoan /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Loan amount /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceCustomizedFixedProjectPosition.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceCustomizedFixedProjectPosition.cs deleted file mode 100644 index 6224d53ed..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceCustomizedFixedProjectPosition.cs +++ /dev/null @@ -1,88 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Customized fixed project position - /// - public record BinanceCustomizedFixedProjectPosition - { - /// - /// Asset name - /// - public string Asset { get; set; } = string.Empty; - /// - /// Can transfer - /// - public bool CanTransfer { get; set; } - /// - /// Create timestamp - /// - [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("createTimestamp")] - public DateTime CreateTime { get; set; } - /// - /// Duration - /// - public int Duration { get; set; } - /// - /// End time - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime EndTime { get; set; } - /// - /// Interest - /// - public decimal Interest { get; set; } - /// - /// Interest rate - /// - public decimal InterestRate { get; set; } - /// - /// Lot - /// - public int Lot { get; set; } - /// - /// Position id - /// - public int PositionId { get; set; } - /// - /// Principal - /// - public decimal Principal { get; set; } - /// - /// Project id - /// - public string ProjectId { get; set; } = string.Empty; - /// - /// Project name - /// - public string ProjectName { get; set; } = string.Empty; - /// - /// Time of purchase - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime PurchaseTime { get; set; } - /// - /// Redeem date - /// - public string RedeemDate { get; set; } = string.Empty; - /// - /// Start time - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime StartTime { get; set; } - /// - /// Status - /// - [JsonConverter(typeof(ProjectStatusConverter))] - public ProjectStatus Status { get; set; } - /// - /// Type - /// - [JsonConverter(typeof(ProjectTypeConverter))] - public ProjectType Type { get; set; } - - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceFlexibleProductPosition.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceFlexibleProductPosition.cs deleted file mode 100644 index 4cece187b..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceFlexibleProductPosition.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Flexible product position - /// - public record BinanceFlexibleProductPosition - { - /// - /// Annual interest rate - /// - public decimal AnnualInterestRate { get; set; } - /// - /// Asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Average annual interest rate - /// - [JsonProperty("avgAnnualInterestRate")] - public decimal AverageAnnualInterestRate { get; set; } - /// - /// Tier Average annual interest rate - /// - [JsonProperty("tierAnnualInterestRate")] - public Dictionary TierAnnualInterestRate { get; set; } = new Dictionary(); - /// - /// Can redeem - /// - public bool CanRedeem { get; set; } - /// - /// Daily interest rate - /// - public decimal DailyInterestRate { get; set; } - /// - /// Quantity free - /// - [JsonProperty("freeAmount")] - public decimal FreeQuantity { get; set; } - /// - /// Quantity frozen - /// - [JsonProperty("freezeAmount")] - public decimal FreezeQuantity { get; set; } - /// - /// Quantity locked - /// - [JsonProperty("lockedAmount")] - public decimal LockedQuantity { get; set; } - - /// - /// The product id - /// - public string ProductId { get; set; } = string.Empty; - /// - /// The product name - /// - public string ProductName { get; set; } = string.Empty; - /// - /// Redeeming quantity - /// - [JsonProperty("redeemingAmount")] - public decimal RedeemingQuantity { get; set; } - /// - /// Quantity purchased today - /// - [JsonProperty("todayPurchasedAmount")] - public decimal TodayPurchasedQuantity { get; set; } - /// - /// Total quantity - /// - [JsonProperty("totalAmount")] - public decimal TotalQuantity { get; set; } - /// - /// Total interest - /// - public decimal TotalInterest { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceInterestHistory.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceInterestHistory.cs deleted file mode 100644 index 51aaf4781..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceInterestHistory.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Interest record - /// - public record BinanceLendingInterestHistory - { - /// - /// Interest - /// - public decimal Interest { get; set; } - /// - /// Asset name - /// - public string Asset { get; set; } = string.Empty; - /// - /// Timestamp - /// - [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] - public DateTime Timestamp { get; set; } - /// - /// Lending type - /// - [JsonConverter(typeof(LendingTypeConverter))] - public LendingType LendingType { get; set; } - /// - /// Name of the product - /// - public string ProductName { get; set; } = string.Empty; - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingAccount.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingAccount.cs deleted file mode 100644 index 1d8801d6e..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingAccount.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Lending account - /// - public record BinanceLendingAccount - { - /// - /// Total quantity in btc - /// - [JsonProperty("totalAmountInBTC")] - public decimal TotalQuantityInBTC { get; set; } - /// - /// Total quantity in usdt - /// - [JsonProperty("totalAmountInUSDT")] - public decimal TotalQuantityInUSDT { get; set; } - /// - /// Total fixed quantity in btc - /// - [JsonProperty("totalFixedAmountInBTC")] - public decimal TotalFixedQuantityInBTC { get; set; } - /// - /// Total fixed quantity in usdt - /// - [JsonProperty("totalFixedAmountInUSDT")] - public decimal TotalFixedQuantityInUSDT { get; set; } - /// - /// Total flexible in btc - /// - public decimal TotalFlexibleInBTC { get; set; } - /// - /// Total flexible in usdt - /// - public decimal TotalFlexibleInUSDT { get; set; } - - /// - /// Position amounts - /// - [JsonProperty("positionAmountVos")] - public IEnumerable PositionAmounts { get; set; } = Array.Empty(); - } - - /// - /// Lending position amount - /// - public record BinanceLendingPositionAmount - { - /// - /// Amount of the asset - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// Amount in btc - /// - [JsonProperty("amountInBTC")] - public decimal QuantityInBTC { get; set; } - /// - /// Amount in usdt - /// - [JsonProperty("amountInUSDT")] - public decimal QuantityInUSDT { get; set; } - /// - /// Asset name - /// - public string Asset { get; set; } = string.Empty; - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingChangeToDailyResult.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingChangeToDailyResult.cs deleted file mode 100644 index 798ea5b20..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingChangeToDailyResult.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Purchase result - /// - public record BinanceLendingChangeToDailyResult - { - /// - /// The id of the purchase - /// - public int DailyPurchaseId { get; set; } - /// - /// Success - /// - public bool Success { get; set; } - /// - /// Time - /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] - public DateTime Timestamp { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingPurchaseResult.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingPurchaseResult.cs deleted file mode 100644 index 3153607c0..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceLendingPurchaseResult.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Purchase result - /// - public record BinanceLendingPurchaseResult - { - /// - /// The id of the purchase - /// - public long PurchaseId { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceProject.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceProject.cs deleted file mode 100644 index 56febfa1d..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceProject.cs +++ /dev/null @@ -1,75 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Binance project info - /// - public record BinanceProject - { - /// - /// The asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Display priority - /// - public int DisplayPriority { get; set; } - /// - /// Duration - /// - public int Duration { get; set; } - /// - /// Interest per lot - /// - public decimal InterestPerLot { get; set; } - /// - /// Interest rate - /// - public decimal InterestRate { get; set; } - /// - /// Lot size - /// - public decimal LotSize { get; set; } - /// - /// Lots low limit - /// - public int LotsLowLimit { get; set; } - /// - /// Lots purchased - /// - public int LotsPurchased { get; set; } - /// - /// Lots upper limit - /// - public int LotsUpLimit { get; set; } - /// - /// Max number of lots per user - /// - public int MaxLotsPerUser { get; set; } - /// - /// Needs know your customer - /// - public bool NeedKYC { get; set; } - /// - /// Project id - /// - public string ProjectId { get; set; } = string.Empty; - - /// - /// Project name - /// - public string ProjectName { get; set; } = string.Empty; - /// - /// Status - /// - public string Status { get; set; } = string.Empty; - - /// - /// Type - /// - public string Type { get; set; } = string.Empty; - /// - /// Has area limitation - /// - public bool WithAreaLimitation { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseQuotaLeft.cs b/Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseQuotaLeft.cs deleted file mode 100644 index a0425f825..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseQuotaLeft.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Purchase quota left - /// - public record BinancePurchaseQuotaLeft - { - /// - /// The asset - /// - public string Asset { get; set; } = string.Empty; - - /// - /// The quota left - /// - public decimal LeftQuota { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseRecord.cs b/Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseRecord.cs deleted file mode 100644 index 9f300b5f4..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinancePurchaseRecord.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Purchase record - /// - public record BinancePurchaseRecord - { - /// - /// Quantity purchased - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// Asset name - /// - public string Asset { get; set; } = string.Empty; - /// - /// Timestamp - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime CreateTime { get; set; } - /// - /// Lending type - /// - [JsonConverter(typeof(LendingTypeConverter))] - public LendingType LendingType { get; set; } - /// - /// Lot - /// - public int Lot { get; set; } - /// - /// Name of the product - /// - public string ProductName { get; set; } = string.Empty; - /// - /// Purchase id - /// - public string PurchaseId { get; set; } = string.Empty; - - /// - /// Purchase status - /// - public string Status { get; set; } = string.Empty; - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionQuotaLeft.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionQuotaLeft.cs deleted file mode 100644 index 777ac427f..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionQuotaLeft.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Redemption quota left - /// - public record BinanceRedemptionQuotaLeft - { - /// - /// The asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Daily quota - /// - public decimal DailyQuota { get; set; } - /// - /// Left quota - /// - public decimal LeftQuota { get; set; } - /// - /// Minimal redemption quantity - /// - [JsonProperty("minRedemptionAmount")] - public decimal MinimalRedemptionQuantity { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionRecord.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionRecord.cs deleted file mode 100644 index a96abd958..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceRedemptionRecord.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Binance.Net.Converters; -using Binance.Net.Enums; - -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Redemption record - /// - public record BinanceRedemptionRecord - { - /// - /// Quantity purchased - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// Asset name - /// - public string Asset { get; set; } = string.Empty; - /// - /// Timestamp - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime CreateTime { get; set; } - /// - /// Start time - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime? StartTime { get; set; } - /// - /// Interest - /// - public decimal Interest { get; set; } - /// - /// Redeem type - /// - [JsonConverter(typeof(RedeemTypeConverter))] - public RedeemType Type { get; set; } - /// - /// Id of the project - /// - public string ProjectId { get; set; } = string.Empty; - /// - /// Name of the project - /// - public string ProjectName { get; set; } = string.Empty; - /// - /// Principal - /// - public decimal Principal { get; set; } - - /// - /// Purchase status - /// - public string Status { get; set; } = string.Empty; - } -} diff --git a/Binance.Net/Objects/Models/Spot/Savings/BinanceSavingsProduct.cs b/Binance.Net/Objects/Models/Spot/Savings/BinanceSavingsProduct.cs deleted file mode 100644 index 4c5339736..000000000 --- a/Binance.Net/Objects/Models/Spot/Savings/BinanceSavingsProduct.cs +++ /dev/null @@ -1,62 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Lending -{ - /// - /// Savings product - /// - public record BinanceSavingsProduct - { - /// - /// The asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Average annual interest rage - /// - [JsonProperty("avgAnnualInterestRate")] - public decimal AverageAnnualInterestRate { get; set; } - /// - /// Can purchase - /// - public bool CanPurchase { get; set; } - /// - /// Can redeem - /// - public bool CanRedeem { get; set; } - /// - /// Daily interest per thousand - /// - public decimal DailyInterestPerThousand { get; set; } - /// - /// Is featured - /// - public bool Featured { get; set; } - /// - /// Minimal quantity to purchase - /// - [JsonProperty("minPurchaseAmount")] - public decimal MinimalPurchaseQuantity { get; set; } - /// - /// Product id - /// - public string ProductId { get; set; } = string.Empty; - /// - /// Purchased quantity - /// - [JsonProperty("purchasedAmount")] - public decimal PurchasedQuantity { get; set; } - /// - /// Status of the product - /// - public string Status { get; set; } = string.Empty; - /// - /// Upper limit - /// - [JsonProperty("upLimit")] - public decimal UpperLimit { get; set; } - /// - /// Upper limit per user - /// - [JsonProperty("upLimitPerUser")] - public decimal UpperLimitPerUser { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnAccount.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnAccount.cs index 6836faadf..1c19cbc37 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnAccount.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnAccount.cs @@ -8,32 +8,32 @@ public record BinanceSimpleEarnAccount /// /// Total quantity in BTC /// - [JsonProperty("totalAmountInBTC")] + [JsonPropertyName("totalAmountInBTC")] public decimal TotalQuantityInBtc { get; set; } /// /// Total quantity in USDT /// - [JsonProperty("totalAmountInUSDT")] + [JsonPropertyName("totalAmountInUSDT")] public decimal TotalQuantityInUsdt { get; set; } /// /// Total quantity in BTC in flexible products /// - [JsonProperty("totalFlexibleAmountInBTC")] + [JsonPropertyName("totalFlexibleAmountInBTC")] public decimal TotalFlexibleQuantityInBtc { get; set; } /// /// Total quantity in USDT in flexible products /// - [JsonProperty("totalFlexibleAmountInUSDT")] + [JsonPropertyName("totalFlexibleAmountInUSDT")] public decimal TotalFlexibleQuantityInUsdt { get; set; } /// /// Total quantity in BTC in locked products /// - [JsonProperty("totalLockedInBTC")] + [JsonPropertyName("totalLockedInBTC")] public decimal TotalLockedInBtc { get; set; } /// /// Total quantity in USDT in locked products /// - [JsonProperty("totalLockedInUSDT")] + [JsonPropertyName("totalLockedInUSDT")] public decimal TotalLockedInUsdt { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnCollateralRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnCollateralRecord.cs index 59a919210..45e78f33f 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnCollateralRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnCollateralRecord.cs @@ -8,37 +8,37 @@ public record BinanceSimpleEarnCollateralRecord /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Product Id /// - [JsonProperty("productId")] + [JsonPropertyName("productId")] public string ProductId { get; set; } = string.Empty; /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Create time /// - [JsonProperty("createTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime CreateTime { get; set; } /// /// Type /// - [JsonProperty("type")] + [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; /// /// Product name /// - [JsonProperty("productName")] + [JsonPropertyName("productName")] public string ProductName { get; set; } = string.Empty; /// /// Order id /// - [JsonProperty("orderId")] + [JsonPropertyName("orderId")] public long OrderId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePosition.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePosition.cs index 8d54c839b..beb1f5d93 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePosition.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePosition.cs @@ -8,72 +8,72 @@ public record BinanceSimpleEarnFlexiblePosition /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Latest annual percentage rate /// - [JsonProperty("latestAnnualPercentageRate")] + [JsonPropertyName("latestAnnualPercentageRate")] public decimal LatestAnnualPercentageRate { get; set; } /// /// Tier annual percentage rate /// - [JsonProperty("tierAnnualPercentageRate")] + [JsonPropertyName("tierAnnualPercentageRate")] public Dictionary TierAnnualPercentageRate { get; set; } = new Dictionary(); /// /// Can redeem product /// - [JsonProperty("canRedeem")] + [JsonPropertyName("canRedeem")] public bool CanRedeem { get; set; } /// /// product id /// - [JsonProperty("productId")] + [JsonPropertyName("productId")] public string ProductId { get; set; } = string.Empty; /// /// Total quantity of position /// - [JsonProperty("totalAmount")] + [JsonPropertyName("totalAmount")] public decimal TotalQuantity { get; set; } /// /// Air drop percentage rate of yesterday /// - [JsonProperty("yesterdayAirdropPercentageRate")] + [JsonPropertyName("yesterdayAirdropPercentageRate")] public decimal YesterdayAirdropPercentageRate { get; set; } /// /// Air drop asset /// - [JsonProperty("airDropAsset")] + [JsonPropertyName("airDropAsset")] public string AirDropAsset { get; set; } = string.Empty; /// /// Collateral quantity /// - [JsonProperty("collateralAmount")] + [JsonPropertyName("collateralAmount")] public decimal CollateralQuantity { get; set; } /// /// Realtime rewards of yesterday /// - [JsonProperty("yesterdayRealTimeRewards")] + [JsonPropertyName("yesterdayRealTimeRewards")] public decimal YesterdayRealTimeRewards { get; set; } /// /// Cumulative bonus rewards /// - [JsonProperty("cumulativeBonusRewards")] + [JsonPropertyName("cumulativeBonusRewards")] public decimal CumulativeBonusRewards { get; set; } /// /// Cumulative realtime rewards /// - [JsonProperty("cumulativeRealTimeRewards")] + [JsonPropertyName("cumulativeRealTimeRewards")] public decimal CumulativeRealTimeRewards { get; set; } /// /// Cumulative total rewards /// - [JsonProperty("cumulativeTotalRewards")] + [JsonPropertyName("cumulativeTotalRewards")] public decimal CumulativeTotalRewards { get; set; } /// /// Is auto subscribe enabled /// - [JsonProperty("autoSubscribe")] + [JsonPropertyName("autoSubscribe")] public bool AutoSubscribe { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePreview.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePreview.cs index 3545b3a0c..6b9b7bae2 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePreview.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexiblePreview.cs @@ -8,32 +8,32 @@ public record BinanceSimpleEarnFlexiblePreview /// /// Reward asset /// - [JsonProperty("rewardAsset")] + [JsonPropertyName("rewardAsset")] public string RewardAsset { get; set; } = string.Empty; /// /// Airdrop asset /// - [JsonProperty("airDropAsset")] + [JsonPropertyName("airDropAsset")] public string AirDropAsset { get; set; } = string.Empty; /// /// Total amount /// - [JsonProperty("totalAmount")] + [JsonPropertyName("totalAmount")] public decimal TotalQuantity { get; set; } /// /// Estimated daily bonus rewards /// - [JsonProperty("estDailyBonusRewards")] + [JsonPropertyName("estDailyBonusRewards")] public decimal EstimatedDailyBonusRewards { get; set; } /// /// Estimated daily realtime rewards /// - [JsonProperty("estDailyRealTimeRewards")] + [JsonPropertyName("estDailyRealTimeRewards")] public decimal EstimatedDailyRealTimeRewards { get; set; } /// /// Estimated daily airdrop rewards /// - [JsonProperty("estDailyAirdropRewards")] + [JsonPropertyName("estDailyAirdropRewards")] public decimal EstimatedDailyAirdropRewards { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleProduct.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleProduct.cs index c65f9520d..1e381a33b 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleProduct.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleProduct.cs @@ -8,62 +8,62 @@ public record BinanceSimpleEarnFlexibleProduct /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Latest annual percentage rate /// - [JsonProperty("latestAnnualPercentageRate")] + [JsonPropertyName("latestAnnualPercentageRate")] public decimal LatestAnnualPercentageRate { get; set; } /// /// Tier annual percentage rate /// - [JsonProperty("tierAnnualPercentageRate")] + [JsonPropertyName("tierAnnualPercentageRate")] public Dictionary TierAnnualPercentageRate { get; set; } = new Dictionary(); /// /// Air drop percentage rate /// - [JsonProperty("airDropPercentageRate")] + [JsonPropertyName("airDropPercentageRate")] public decimal AirDropPercentageRate { get; set; } /// /// Can purchase product /// - [JsonProperty("canPurchase")] + [JsonPropertyName("canPurchase")] public bool CanPurchase { get; set; } /// /// Can redeem product /// - [JsonProperty("canRedeem")] + [JsonPropertyName("canRedeem")] public bool CanRedeem { get; set; } /// /// Product is sold out /// - [JsonProperty("isSoldOut")] + [JsonPropertyName("isSoldOut")] public bool IsSoldOut { get; set; } /// /// Is hot /// - [JsonProperty("hot")] + [JsonPropertyName("hot")] public bool Hot { get; set; } /// /// Min purchase quantity /// - [JsonProperty("minPurchaseAmount")] + [JsonPropertyName("minPurchaseAmount")] public decimal MinPurchaseQuantity { get; set; } /// /// product id /// - [JsonProperty("productId")] + [JsonPropertyName("productId")] public string ProductId { get; set; } = string.Empty; /// /// Subscription start time /// - [JsonProperty("subscriptionStartTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("subscriptionStartTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime? SubscriptionStartTime { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRecord.cs index ea25bf636..8f13e88ad 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRecord.cs @@ -10,47 +10,47 @@ public record BinanceSimpleEarnFlexibleRecord /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Purchase id /// - [JsonProperty("purchaseId")] + [JsonPropertyName("purchaseId")] public long PurchaseId { get; set; } /// /// Subscription type /// - [JsonProperty("type"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("type"), JsonConverter(typeof(EnumConverter))] public SubscriptionType Type { get; set; } /// /// Source account /// - [JsonProperty("sourceAccount"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("sourceAccount"), JsonConverter(typeof(EnumConverter))] public AccountSource SourceAccount { get; set; } /// /// Quantity from spot /// - [JsonProperty("amtFromSpot")] + [JsonPropertyName("amtFromSpot")] public decimal SpotQuantity { get; set; } /// /// Quantity from funding /// - [JsonProperty("amtFromFunding")] + [JsonPropertyName("amtFromFunding")] public decimal FundingQuantity { get; set; } /// /// Status /// - [JsonProperty("status"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("status"), JsonConverter(typeof(EnumConverter))] public SubscriptionStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRedemptionRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRedemptionRecord.cs index 085917648..adf96cd8d 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRedemptionRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRedemptionRecord.cs @@ -10,36 +10,37 @@ public record BinanceSimpleEarnFlexibleRedemptionRecord /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Project id /// - [JsonProperty("projectId")] + [JsonPropertyName("projectId")] public string ProjectId { get; set; } = string.Empty; /// /// Redeem id /// - [JsonProperty("redeemId")] + [JsonPropertyName("redeemId")] public long RedeemId { get; set; } /// /// Destination account /// - [JsonProperty("destAccount"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("destAccount"), JsonConverter(typeof(EnumConverter))] public AccountSource DestinationAccount { get; set; } /// /// Status /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRewardRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRewardRecord.cs index 2998812c2..d7fbd8192 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRewardRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnFlexibleRewardRecord.cs @@ -10,27 +10,27 @@ public record BinanceSimpleEarnFlexibleRewardRecord /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Project id /// - [JsonProperty("projectId")] + [JsonPropertyName("projectId")] public string ProjectId { get; set; } = string.Empty; /// /// Rewards /// - [JsonProperty("rewards")] + [JsonPropertyName("rewards")] public decimal Rewards { get; set; } /// /// Reward type /// - [JsonProperty("type"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("type"), JsonConverter(typeof(EnumConverter))] public RewardType Type { get; set; } /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPosition.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPosition.cs index af0d3c0ce..1b1c1502c 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPosition.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPosition.cs @@ -8,62 +8,62 @@ public record BinanceSimpleEarnLockedPosition /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Position id /// - [JsonProperty("positionId")] + [JsonPropertyName("positionId")] public string PositionId { get; set; } = string.Empty; /// /// Project id /// - [JsonProperty("projectId")] + [JsonPropertyName("projectId")] public string ProjectId { get; set; } = string.Empty; /// /// Position quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Purchase time /// - [JsonProperty("purchaseTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("purchaseTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime? PurchaseTime { get; set; } /// /// Duration in days /// - [JsonProperty("duration")] + [JsonPropertyName("duration")] public int Duration { get; set; } /// /// Accrual days /// - [JsonProperty("accrualDays")] + [JsonPropertyName("accrualDays")] public int AccrualDays { get; set; } /// /// Reward asset /// - [JsonProperty("rewardAsset")] + [JsonPropertyName("rewardAsset")] public string RewardAsset { get; set; } = string.Empty; /// /// APY /// - [JsonProperty("APY")] + [JsonPropertyName("APY")] public decimal APY { get; set; } /// /// Is renewable /// - [JsonProperty("isRenewable")] + [JsonPropertyName("isRenewable")] public bool IsRenewable { get; set; } /// /// Is auto renew enabled /// - [JsonProperty("isAutoRenew")] + [JsonPropertyName("isAutoRenew")] public bool IsAutoRenew { get; set; } /// /// Redeem date /// - [JsonProperty("redeemDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("redeemDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime? RedeemDate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPreview.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPreview.cs index 341df21b2..f912f118e 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPreview.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedPreview.cs @@ -8,52 +8,52 @@ public record BinanceSimpleEarnLockedPreview /// /// Reward asset /// - [JsonProperty("rewardAsset")] + [JsonPropertyName("rewardAsset")] public string RewardAsset { get; set; } = string.Empty; /// /// Extra reward asset /// - [JsonProperty("extraRewardAsset")] + [JsonPropertyName("extraRewardAsset")] public string ExtraRewardAsset { get; set; } = string.Empty; /// /// Total reward quantity /// - [JsonProperty("totalRewardAmt")] + [JsonPropertyName("totalRewardAmt")] public decimal TotalRewardQuantity { get; set; } /// /// Estimated total extra reward quantity /// - [JsonProperty("estTotalExtraRewardAmt")] + [JsonPropertyName("estTotalExtraRewardAmt")] public decimal EstimatedTotalExtraRewardQuantity { get; set; } /// /// Next pay /// - [JsonProperty("nextPay")] + [JsonPropertyName("nextPay")] public decimal NextPay { get; set; } /// /// Next pay date /// - [JsonProperty("nextPayDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("nextPayDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime NextPayDate { get; set; } /// /// Value date /// - [JsonProperty("valueDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("valueDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime ValueDate { get; set; } /// /// Rewards end date /// - [JsonProperty("rewardsEndDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("rewardsEndDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime RewardsEndDate { get; set; } /// /// Deliver date /// - [JsonProperty("deliverDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("deliverDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime DeliverDate { get; set; } /// /// Next subscription date /// - [JsonProperty("nextSubscriptionDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("nextSubscriptionDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime NextSubscriptionDate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedProduct.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedProduct.cs index ed090683f..a3076d81d 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedProduct.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedProduct.cs @@ -8,17 +8,17 @@ public record BinanceSimpleEarnLockedProduct /// /// Project id /// - [JsonProperty("projectId")] + [JsonPropertyName("projectId")] public string ProjectId { get; set; } = string.Empty; /// /// Details /// - [JsonProperty("detail")] + [JsonPropertyName("detail")] public BinanceSimpleEarnLockedProjectDetails Details { get; set; } = null!; /// /// Quota /// - [JsonProperty("quota")] + [JsonPropertyName("quota")] public BinanceSimpleEarnLockedProjectQuota Quota { get; set; } = null!; } @@ -30,52 +30,52 @@ public record BinanceSimpleEarnLockedProjectDetails /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Reward asset /// - [JsonProperty("rewardAsset")] + [JsonPropertyName("rewardAsset")] public string RewardAsset { get; set; } = string.Empty; /// /// Duration /// - [JsonProperty("duration")] + [JsonPropertyName("duration")] public int Duration { get; set; } /// /// Renewable /// - [JsonProperty("renewable")] + [JsonPropertyName("renewable")] public bool Renewable { get; set; } /// /// Is sold out /// - [JsonProperty("isSoldOut")] + [JsonPropertyName("isSoldOut")] public bool IsSoldOut { get; set; } /// /// Apr /// - [JsonProperty("apr")] + [JsonPropertyName("apr")] public decimal Apr { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Subscription start time /// - [JsonProperty("subscriptionStartTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("subscriptionStartTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime? SubscriptionStartTime { get; set; } /// /// Extra reward asset /// - [JsonProperty("extraRewardAsset")] + [JsonPropertyName("extraRewardAsset")] public string ExtraRewardAsset { get; set; } = string.Empty; /// /// Extra reward apr /// - [JsonProperty("extraRewardAPR")] + [JsonPropertyName("extraRewardAPR")] public decimal ExtraRewardApr { get; set; } } @@ -87,12 +87,12 @@ public record BinanceSimpleEarnLockedProjectQuota /// /// Total personal quota /// - [JsonProperty("totalPersonalQuota")] + [JsonPropertyName("totalPersonalQuota")] public decimal TotalPersonalQuota { get; set; } /// /// Minimum /// - [JsonProperty("minimum")] + [JsonPropertyName("minimum")] public decimal Minimum { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRecord.cs index 34145d5fa..04f7acbeb 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRecord.cs @@ -10,57 +10,57 @@ public record BinanceSimpleEarnLockedRecord /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Position id /// - [JsonProperty("positionId")] + [JsonPropertyName("positionId")] public string PositionId { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Purchase id /// - [JsonProperty("purchaseId")] + [JsonPropertyName("purchaseId")] public long PurchaseId { get; set; } /// /// Subscription type /// - [JsonProperty("type"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("type"), JsonConverter(typeof(EnumConverter))] public SubscriptionType Type { get; set; } /// /// Source account /// - [JsonProperty("sourceAccount"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("sourceAccount"), JsonConverter(typeof(EnumConverter))] public AccountSource SourceAccount { get; set; } /// /// Quantity from spot /// - [JsonProperty("amtFromSpot")] + [JsonPropertyName("amtFromSpot")] public decimal SpotQuantity { get; set; } /// /// Quantity from funding /// - [JsonProperty("amtFromFunding")] + [JsonPropertyName("amtFromFunding")] public decimal FundingQuantity { get; set; } /// /// Status /// - [JsonProperty("status"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("status"), JsonConverter(typeof(EnumConverter))] public SubscriptionStatus Status { get; set; } /// /// Lock period /// - [JsonProperty("lockPeriod")] + [JsonPropertyName("lockPeriod")] public int LockPeriod { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRedemptionRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRedemptionRecord.cs index bb843db02..fcea9dfe3 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRedemptionRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRedemptionRecord.cs @@ -10,46 +10,47 @@ public record BinanceSimpleEarnLockedRedemptionRecord /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Position id /// - [JsonProperty("positionId")] + [JsonPropertyName("positionId")] public string PositionId { get; set; } = string.Empty; /// /// Redeem id /// - [JsonProperty("redeemId")] + [JsonPropertyName("redeemId")] public long RedeemId { get; set; } /// /// Status /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Lock period /// - [JsonProperty("lockPeriod")] + [JsonPropertyName("lockPeriod")] public int LockPeriod { get; set; } /// /// Delivery date /// - [JsonProperty("deliverDate"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("deliverDate"), JsonConverter(typeof(DateTimeConverter))] public DateTime DeliveryDate { get; set; } /// /// Type /// - [JsonProperty("type"), JsonConverter(typeof(EnumConverter))] + [JsonPropertyName("type"), JsonConverter(typeof(EnumConverter))] public RedemptionType Type { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRewardRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRewardRecord.cs index 6b257ea00..4b7ea98d4 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRewardRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnLockedRewardRecord.cs @@ -8,27 +8,27 @@ public record BinanceSimpleEarnLockedRewardRecord /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Position id /// - [JsonProperty("positionId")] + [JsonPropertyName("positionId")] public string PositionId { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Lock period /// - [JsonProperty("lockPeriod")] + [JsonPropertyName("lockPeriod")] public int LockPeriod { get; set; } /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPersonalQuotaLeft.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPersonalQuotaLeft.cs index 7214c3510..dce153888 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPersonalQuotaLeft.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPersonalQuotaLeft.cs @@ -8,7 +8,7 @@ public record BinanceSimpleEarnPersonalQuotaLeft /// /// Personal quota left /// - [JsonProperty("leftPersonalQuota")] + [JsonPropertyName("leftPersonalQuota")] public decimal PersonalQuotaLeft { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPurchase.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPurchase.cs index 18f4bf49f..d4dd9158c 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPurchase.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnPurchase.cs @@ -8,17 +8,17 @@ public record BinanceSimpleEarnPurchase /// /// Success /// - [JsonProperty("success")] + [JsonPropertyName("success")] public bool Success { get; set; } /// /// Purchase id /// - [JsonProperty("purchaseId")] + [JsonPropertyName("purchaseId")] public long PurchaseId { get; set; } /// /// Position id /// - [JsonProperty("positionId")] + [JsonPropertyName("positionId")] public string? PositionId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRateRecord.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRateRecord.cs index 549631e4b..ce2aef53a 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRateRecord.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRateRecord.cs @@ -8,22 +8,22 @@ public record BinanceSimpleEarnRateRecord /// /// Product id /// - [JsonProperty("productId")] + [JsonPropertyName("productId")] public string ProductId { get; set; } = string.Empty; /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Annual percentage rate /// - [JsonProperty("annualPercentageRate")] + [JsonPropertyName("annualPercentageRate")] public decimal AnnualPercentageRate { get; set; } /// /// Timestamp /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRedemption.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRedemption.cs index f0721a1f6..aa0ff4aaa 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRedemption.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnRedemption.cs @@ -8,12 +8,12 @@ public record BinanceSimpleEarnRedemption /// /// Success /// - [JsonProperty("success")] + [JsonPropertyName("success")] public bool Success { get; set; } /// /// Redeem id /// - [JsonProperty("redeemId")] + [JsonPropertyName("redeemId")] public long RedeemId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnResult.cs b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnResult.cs index f741b7f4b..28c494bd5 100644 --- a/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnResult.cs +++ b/Binance.Net/Objects/Models/Spot/SimpleEarn/BinanceSimpleEarnResult.cs @@ -8,7 +8,7 @@ public record BinanceSimpleEarnResult /// /// Result /// - [JsonProperty("success")] + [JsonPropertyName("success")] public bool Success { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamAggregatedTrade.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamAggregatedTrade.cs index d7f7eff1f..ad7d62297 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamAggregatedTrade.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamAggregatedTrade.cs @@ -10,48 +10,48 @@ public record BinanceStreamAggregatedTrade: BinanceStreamEvent, IBinanceAggregat /// /// The symbol the trade was for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The id of this aggregated trade /// - [JsonProperty("a")] + [JsonPropertyName("a")] public long Id { get; set; } /// /// The price of the trades /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal Price { get; set; } /// /// The combined quantity of the trades /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal Quantity { get; set; } /// /// The first trade id in this aggregation /// - [JsonProperty("f")] + [JsonPropertyName("f")] public long FirstTradeId { get; set; } /// /// The last trade id in this aggregation /// - [JsonProperty("l")] + [JsonPropertyName("l")] public long LastTradeId { get; set; } /// /// The time of the trades /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TradeTime { get; set; } /// /// Whether the buyer was the maker /// - [JsonProperty("m")] + [JsonPropertyName("m")] public bool BuyerIsMaker { get; set; } /// /// Unused /// - [JsonProperty("M")] + [JsonPropertyName("M")] public bool Ignore { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBalanceUpdate.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBalanceUpdate.cs index 7483e94c9..32dc0b039 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBalanceUpdate.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBalanceUpdate.cs @@ -8,12 +8,12 @@ public record BinanceStreamBalanceUpdate: BinanceStreamEvent /// /// The asset which changed /// - [JsonProperty("a")] + [JsonPropertyName("a")] public string Asset { get; set; } = string.Empty; /// /// The balance delta /// - [JsonProperty("d")] + [JsonPropertyName("d")] public decimal BalanceDelta { get; set; } /// /// The listen key the update was for @@ -22,7 +22,7 @@ public record BinanceStreamBalanceUpdate: BinanceStreamEvent /// /// The time the deposit/withdrawal was cleared /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime ClearTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBookPrice.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBookPrice.cs index 2c7ff6cbe..219294223 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBookPrice.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamBookPrice.cs @@ -10,32 +10,32 @@ public record BinanceStreamBookPrice: IBinanceBookPrice /// /// Update id /// - [JsonProperty("u")] + [JsonPropertyName("u")] public long UpdateId { get; set; } /// /// The symbol /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// Price of the best bid /// - [JsonProperty("b")] + [JsonPropertyName("b")] public decimal BestBidPrice { get; set; } /// /// Quantity of the best bid /// - [JsonProperty("B")] + [JsonPropertyName("B")] public decimal BestBidQuantity { get; set; } /// /// Price of the best ask /// - [JsonProperty("a")] + [JsonPropertyName("a")] public decimal BestAskPrice { get; set; } /// /// Quantity of the best ask /// - [JsonProperty("A")] + [JsonPropertyName("A")] public decimal BestAskQuantity { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamKline.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamKline.cs index 9c4791345..246a8d0d2 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamKline.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamKline.cs @@ -12,99 +12,99 @@ public record BinanceStreamKlineData: BinanceStreamEvent, IBinanceStreamKlineDat /// /// The symbol the data is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The data /// - [JsonProperty("k")] - [JsonConverter(typeof(InterfaceConverter))] + [JsonPropertyName("k")] + [JsonConverter(typeof(InterfaceConverter))] public IBinanceStreamKline Data { get; set; } = default!; } /// /// The kline data /// - public record BinanceStreamKline: BinanceKlineBase, IBinanceStreamKline + public record BinanceStreamKline: IBinanceStreamKline { /// /// The open time of this candlestick /// - [JsonProperty("t"), JsonConverter(typeof(DateTimeConverter))] - public new DateTime OpenTime { get; set; } + [JsonPropertyName("t"), JsonConverter(typeof(DateTimeConverter))] + public DateTime OpenTime { get; set; } /// - [JsonProperty("v")] - public override decimal Volume { get; set; } + [JsonPropertyName("v")] + public decimal Volume { get; set; } /// /// The close time of this candlestick /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] - public new DateTime CloseTime { get; set; } + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] + public DateTime CloseTime { get; set; } /// - [JsonProperty("q")] - public override decimal QuoteVolume { get; set; } + [JsonPropertyName("q")] + public decimal QuoteVolume { get; set; } /// /// The symbol this candlestick is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The interval of this candlestick /// - [JsonProperty("i"), JsonConverter(typeof(KlineIntervalConverter))] + [JsonPropertyName("i"), JsonConverter(typeof(EnumConverter))] public KlineInterval Interval { get; set; } /// /// The first trade id in this candlestick /// - [JsonProperty("f")] + [JsonPropertyName("f")] public long FirstTrade { get; set; } /// /// The last trade id in this candlestick /// - [JsonProperty("L")] + [JsonPropertyName("L")] public long LastTrade { get; set; } /// /// The open price of this candlestick /// - [JsonProperty("o")] - public new decimal OpenPrice { get; set; } + [JsonPropertyName("o")] + public decimal OpenPrice { get; set; } /// /// The close price of this candlestick /// - [JsonProperty("c")] - public new decimal ClosePrice { get; set; } + [JsonPropertyName("c")] + public decimal ClosePrice { get; set; } /// /// The highest price of this candlestick /// - [JsonProperty("h")] - public new decimal HighPrice { get; set; } + [JsonPropertyName("h")] + public decimal HighPrice { get; set; } /// /// The lowest price of this candlestick /// - [JsonProperty("l")] - public new decimal LowPrice { get; set; } + [JsonPropertyName("l")] + public decimal LowPrice { get; set; } /// /// The amount of trades in this candlestick /// - [JsonProperty("n")] - public new int TradeCount { get; set; } + [JsonPropertyName("n")] + public int TradeCount { get; set; } /// - [JsonProperty("V")] - public override decimal TakerBuyBaseVolume { get; set; } + [JsonPropertyName("V")] + public decimal TakerBuyBaseVolume { get; set; } /// - [JsonProperty("Q")] - public override decimal TakerBuyQuoteVolume { get; set; } + [JsonPropertyName("Q")] + public decimal TakerBuyQuoteVolume { get; set; } /// /// Boolean indicating whether this candlestick is closed /// - [JsonProperty("x")] + [JsonPropertyName("x")] public bool Final { get; set; } /// diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamMiniTick.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamMiniTick.cs index ddf717182..619e08a45 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamMiniTick.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamMiniTick.cs @@ -10,31 +10,31 @@ public abstract record BinanceStreamMiniTickBase : BinanceStreamEvent, IBinanceM /// /// The symbol this data is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The current day close price. This is the latest price for this symbol. /// - [JsonProperty("c")] + [JsonPropertyName("c")] public decimal LastPrice { get; set; } /// /// Todays open price /// - [JsonProperty("o")] + [JsonPropertyName("o")] public decimal OpenPrice { get; set; } /// /// Todays high price /// - [JsonProperty("h")] + [JsonPropertyName("h")] public decimal HighPrice { get; set; } /// /// Todays low price /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal LowPrice { get; set; } /// @@ -54,10 +54,10 @@ public abstract record BinanceStreamMiniTickBase : BinanceStreamEvent, IBinanceM public record BinanceStreamMiniTick: BinanceStreamMiniTickBase { /// - [JsonProperty("v")] + [JsonPropertyName("v")] public override decimal Volume { get; set; } /// - [JsonProperty("q")] + [JsonPropertyName("q")] public override decimal QuoteVolume { get; set; } } @@ -67,16 +67,16 @@ public record BinanceStreamMiniTick: BinanceStreamMiniTickBase public record BinanceStreamCoinMiniTick : BinanceStreamMiniTickBase { /// - [JsonProperty("q")] + [JsonPropertyName("q")] public override decimal Volume { get; set; } /// - [JsonProperty("v")] + [JsonPropertyName("v")] public override decimal QuoteVolume { get; set; } /// /// The pair /// - [JsonProperty("ps")] + [JsonPropertyName("ps")] public string Pair { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderList.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderList.cs index 3a4ce06b7..c0a0972d1 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderList.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderList.cs @@ -11,50 +11,48 @@ public record BinanceStreamOrderList: BinanceStreamEvent /// /// The id of the order list /// - [JsonProperty("g")] + [JsonPropertyName("g")] public long Id { get; set; } /// /// The contingency type /// - [JsonProperty("c")] + [JsonPropertyName("c")] public string ContingencyType { get; set; } = string.Empty; /// /// The order list status /// - [JsonConverter(typeof(ListStatusTypeConverter))] - [JsonProperty("l")] + [JsonPropertyName("l")] public ListStatusType ListStatusType { get; set; } /// /// The order status /// - [JsonConverter(typeof(ListOrderStatusConverter))] - [JsonProperty("L")] + [JsonPropertyName("L")] public ListOrderStatus ListOrderStatus { get; set; } /// /// Rejection reason /// - [JsonProperty("r")] + [JsonPropertyName("r")] public string? ListRejectReason { get; set; } /// /// The client id of the order list /// - [JsonProperty("C")] + [JsonPropertyName("C")] public string ListClientOrderId { get; set; } = string.Empty; /// /// The transaction time /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("T")] + [JsonPropertyName("T")] public DateTime TransactionTime { get; set; } /// /// The symbol of the order list /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The order in this list /// - [JsonProperty("O")] + [JsonPropertyName("O")] public IEnumerable Orders { get; set; } = Array.Empty(); /// /// The listen key the update was for @@ -70,17 +68,17 @@ public record BinanceStreamOrderId /// /// The symbol of the order /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The id of the order /// - [JsonProperty("i")] + [JsonPropertyName("i")] public long OrderId { get; set; } /// /// The client order id /// - [JsonProperty("c")] + [JsonPropertyName("c")] public string ClientOrderId { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderUpdate.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderUpdate.cs index cf9f8bdb5..8c8b51a36 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderUpdate.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamOrderUpdate.cs @@ -11,152 +11,152 @@ public record BinanceStreamOrderUpdate: BinanceStreamEvent /// /// The id of the order as assigned by Binance /// - [JsonProperty("i")] + [JsonPropertyName("i")] public long Id { get; set; } /// /// The symbol the order is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The new client order id /// - [JsonProperty("c")] + [JsonPropertyName("c")] public string ClientOrderId { get; set; } = string.Empty; /// /// The side of the order /// - [JsonProperty("S"), JsonConverter(typeof(OrderSideConverter))] + [JsonPropertyName("S")] public OrderSide Side { get; set; } /// /// The type of the order /// - [JsonProperty("o"), JsonConverter(typeof(SpotOrderTypeConverter))] + [JsonPropertyName("o")] public SpotOrderType Type { get; set; } /// /// The timespan the order is active /// - [JsonProperty("f"), JsonConverter(typeof(TimeInForceConverter))] + [JsonPropertyName("f")] public TimeInForce TimeInForce { get; set; } /// /// The quantity of the order /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal Quantity { get; set; } /// /// The price of the order /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal Price { get; set; } /// /// The stop price of the order /// - [JsonProperty("P")] + [JsonPropertyName("P")] public decimal StopPrice { get; set; } /// /// The trailing delta of the order /// - [JsonProperty("d")] + [JsonPropertyName("d")] public int? TrailingDelta { get; set; } /// /// Trailing Time; This is only visible if the trailing stop order has been activated. /// - [JsonProperty("D"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("D")] public DateTime TrailingTime { get; set; } /// /// The iceberg quantity of the order /// - [JsonProperty("F")] + [JsonPropertyName("F")] public decimal IcebergQuantity { get; set; } /// /// The original client order id /// - [JsonProperty("C")] + [JsonPropertyName("C")] public string? OriginalClientOrderId { get; set; } = string.Empty; /// /// The execution type /// - [JsonProperty("x"), JsonConverter(typeof(ExecutionTypeConverter))] + [JsonPropertyName("x")] public ExecutionType ExecutionType { get; set; } /// /// The status of the order /// - [JsonProperty("X"), JsonConverter(typeof(OrderStatusConverter))] + [JsonPropertyName("X")] public OrderStatus Status { get; set; } /// /// The reason the order was rejected /// - [JsonProperty("r"), JsonConverter(typeof(OrderRejectReasonConverter))] + [JsonPropertyName("r")] public OrderRejectReason RejectReason { get; set; } /// /// The quantity of the last filled trade of this order /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal LastQuantityFilled { get; set; } /// /// The quantity of all trades that were filled for this order /// - [JsonProperty("z")] + [JsonPropertyName("z")] public decimal QuantityFilled { get; set; } /// /// The price of the last filled trade /// - [JsonProperty("L")] + [JsonPropertyName("L")] public decimal LastPriceFilled { get; set; } /// /// The fee payed /// - [JsonProperty("n")] + [JsonPropertyName("n")] public decimal Fee { get; set; } /// /// The asset the fee was taken from /// - [JsonProperty("N")] + [JsonPropertyName("N")] public string FeeAsset { get; set; } = string.Empty; /// /// The time of the update /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime UpdateTime { get; set; } /// /// The trade id /// - [JsonProperty("t")] + [JsonPropertyName("t")] public long TradeId { get; set; } /// /// Is working /// - [JsonProperty("w")] + [JsonPropertyName("w")] public bool IsWorking { get; set; } /// /// Whether the buyer is the maker /// - [JsonProperty("m")] + [JsonPropertyName("m")] public bool BuyerIsMaker { get; set; } /// /// Time the order was created /// - [JsonProperty("O"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("O"), JsonConverter(typeof(DateTimeConverter))] public DateTime CreateTime { get; set; } /// /// Cummulative quantity /// - [JsonProperty("Z")] + [JsonPropertyName("Z")] public decimal QuoteQuantityFilled { get; set; } /// /// Quote order quantity /// - [JsonProperty("Q")] + [JsonPropertyName("Q")] public decimal QuoteQuantity { get; set; } /// /// Last quote asset transacted quantity (i.e. LastPrice * LastQuantity) /// - [JsonProperty("Y")] + [JsonPropertyName("Y")] public decimal LastQuoteQuantity { get; set; } /// /// This id of the corresponding order list. (-1 if not part of an order list) /// - [JsonProperty("g")] + [JsonPropertyName("g")] public long OrderListId { get; set; } /// /// The listen key for which the update was @@ -167,48 +167,48 @@ public record BinanceStreamOrderUpdate: BinanceStreamEvent /// /// Unused /// - [JsonProperty("I")] + [JsonPropertyName("I")] public long I { get; set; } /// /// Unused /// - [JsonProperty("M")] + [JsonPropertyName("M")] public bool M { get; set; } /// /// Trade group id /// - [JsonProperty("u")] + [JsonPropertyName("u")] public long? TradeGroupId { get; set; } /// /// Prevented match id /// - [JsonProperty("v")] + [JsonPropertyName("v")] public long? PreventedMatchId { get; set; } /// /// Counter order id /// - [JsonProperty("U")] + [JsonPropertyName("U")] public long? CounterOrderId { get; set; } /// /// Prevented quantity /// - [JsonProperty("A")] + [JsonPropertyName("A")] public decimal? PreventedQuantity { get; set; } /// /// Last prevented quantiy /// - [JsonProperty("B")] + [JsonPropertyName("B")] public decimal? LastPreventedQuantity { get; set; } /// /// Prevented match id /// - [JsonProperty("V")] + [JsonPropertyName("V")] [JsonConverter(typeof(EnumConverter))] public SelfTradePreventionMode? SelfTradePreventionMode { get; set; } /// /// Working time; when it entered the order book /// - [JsonProperty("W"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("W"), JsonConverter(typeof(DateTimeConverter))] public DateTime? WorkingTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamPositionsUpdate.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamPositionsUpdate.cs index 4947b9f77..821b8a30b 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamPositionsUpdate.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamPositionsUpdate.cs @@ -10,7 +10,7 @@ public record BinanceStreamPositionsUpdate : BinanceStreamEvent /// /// Time of last account update /// - [JsonProperty("u"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("u"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// The listen key the update was for @@ -19,7 +19,7 @@ public record BinanceStreamPositionsUpdate : BinanceStreamEvent /// /// Balances /// - [JsonProperty("B")] + [JsonPropertyName("B")] public IEnumerable Balances { get; set; } = Array.Empty(); } @@ -31,17 +31,17 @@ public record BinanceStreamBalance: IBinanceBalance /// /// The asset this balance is for /// - [JsonProperty("a")] + [JsonPropertyName("a")] public string Asset { get; set; } = string.Empty; /// /// The quantity that isn't locked in a trade /// - [JsonProperty("f")] + [JsonPropertyName("f")] public decimal Available { get; set; } /// /// The quantity that is currently locked in a trade /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal Locked { get; set; } /// /// The total balance of this asset (Free + Locked) diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamRollingWindowTick.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamRollingWindowTick.cs index 8b7fc4c22..e1c9177e8 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamRollingWindowTick.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamRollingWindowTick.cs @@ -8,77 +8,77 @@ public record BinanceStreamRollingWindowTick: BinanceStreamEvent /// /// The symbol this data is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The price change of this symbol /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal PriceChange { get; set; } /// /// The price change percentage of this symbol /// - [JsonProperty("P")] + [JsonPropertyName("P")] public decimal PriceChangePercent { get; set; } /// /// The weighted average /// - [JsonProperty("w")] + [JsonPropertyName("w")] public decimal WeightedAveragePrice { get; set; } /// /// The current close price. This is the latest price for this symbol. /// - [JsonProperty("c")] + [JsonPropertyName("c")] public decimal LastPrice { get; set; } /// /// Tick open price /// - [JsonProperty("o")] + [JsonPropertyName("o")] public decimal OpenPrice { get; set; } /// /// Tick high price /// - [JsonProperty("h")] + [JsonPropertyName("h")] public decimal HighPrice { get; set; } /// /// Tick low price /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal LowPrice { get; set; } /// /// The first trade id of the tick /// - [JsonProperty("F")] + [JsonPropertyName("F")] public long FirstTradeId { get; set; } /// /// The last trade id of the tick /// - [JsonProperty("L")] + [JsonPropertyName("L")] public long LastTradeId { get; set; } /// /// The total trades of id /// - [JsonProperty("n")] + [JsonPropertyName("n")] public long TotalTrades { get; set; } /// /// The open time of these stats /// - [JsonProperty("O"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("O"), JsonConverter(typeof(DateTimeConverter))] public DateTime OpenTime { get; set; } /// /// The close time of these stats /// - [JsonProperty("C"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("C"), JsonConverter(typeof(DateTimeConverter))] public DateTime CloseTime { get; set; } /// /// Volume /// - [JsonProperty("v")] + [JsonPropertyName("v")] public decimal Volume { get; set; } /// /// Quote volume /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal QuoteVolume { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTick.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTick.cs index 5f99cb0bb..5cca3bf0d 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTick.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTick.cs @@ -10,72 +10,72 @@ public abstract record BinanceStreamTickBase: BinanceStreamEvent, IBinanceTick /// /// The symbol this data is for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The price change of this symbol /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal PriceChange { get; set; } /// /// The price change percentage of this symbol /// - [JsonProperty("P")] + [JsonPropertyName("P")] public decimal PriceChangePercent { get; set; } /// /// The weighted average /// - [JsonProperty("w")] + [JsonPropertyName("w")] public decimal WeightedAveragePrice { get; set; } /// /// The close price of the previous day /// - [JsonProperty("x")] + [JsonPropertyName("x")] public decimal PrevDayClosePrice { get; set; } /// /// The current day close price. This is the latest price for this symbol. /// - [JsonProperty("c")] + [JsonPropertyName("c")] public decimal LastPrice { get; set; } /// /// The most recent trade quantity /// - [JsonProperty("Q")] + [JsonPropertyName("Q")] public decimal LastQuantity { get; set; } /// /// The best bid price in the order book /// - [JsonProperty("b")] + [JsonPropertyName("b")] public decimal BestBidPrice { get; set; } /// /// The quantity of the best bid price in the order book /// - [JsonProperty("B")] + [JsonPropertyName("B")] public decimal BestBidQuantity { get; set; } /// /// The best ask price in the order book /// - [JsonProperty("a")] + [JsonPropertyName("a")] public decimal BestAskPrice { get; set; } /// /// The quantity of the best ask price in the order book /// - [JsonProperty("A")] + [JsonPropertyName("A")] public decimal BestAskQuantity { get; set; } /// /// Todays open price /// - [JsonProperty("o")] + [JsonPropertyName("o")] public decimal OpenPrice { get; set; } /// /// Todays high price /// - [JsonProperty("h")] + [JsonPropertyName("h")] public decimal HighPrice { get; set; } /// /// Todays low price /// - [JsonProperty("l")] + [JsonPropertyName("l")] public decimal LowPrice { get; set; } /// /// Total traded volume in the base asset @@ -88,27 +88,27 @@ public abstract record BinanceStreamTickBase: BinanceStreamEvent, IBinanceTick /// /// The first trade id of today /// - [JsonProperty("F")] + [JsonPropertyName("F")] public long FirstTradeId { get; set; } /// /// The last trade id of today /// - [JsonProperty("L")] + [JsonPropertyName("L")] public long LastTradeId { get; set; } /// /// The total trades of id /// - [JsonProperty("n")] + [JsonPropertyName("n")] public long TotalTrades { get; set; } /// /// The open time of these stats /// - [JsonProperty("O"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("O"), JsonConverter(typeof(DateTimeConverter))] public DateTime OpenTime { get; set; } /// /// The close time of these stats /// - [JsonProperty("C"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("C"), JsonConverter(typeof(DateTimeConverter))] public DateTime CloseTime { get; set; } } @@ -120,12 +120,12 @@ public record BinanceStreamTick: BinanceStreamTickBase /// /// Total traded volume in the base asset /// - [JsonProperty("v")] + [JsonPropertyName("v")] public override decimal Volume { get; set; } /// /// Total traded volume in the quote asset /// - [JsonProperty("q")] + [JsonPropertyName("q")] public override decimal QuoteVolume { get; set; } } @@ -137,12 +137,12 @@ public record BinanceStreamCoinTick : BinanceStreamTickBase /// /// Total traded volume in the base asset /// - [JsonProperty("q")] + [JsonPropertyName("q")] public override decimal Volume { get; set; } /// /// Total traded volume in the quote asset /// - [JsonProperty("v")] + [JsonPropertyName("v")] public override decimal QuoteVolume { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTrade.cs b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTrade.cs index 26e7cebad..5b6316edf 100644 --- a/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTrade.cs +++ b/Binance.Net/Objects/Models/Spot/Socket/BinanceStreamTrade.cs @@ -10,54 +10,54 @@ public record BinanceStreamTrade: BinanceStreamEvent, IBinanceTrade /// /// The symbol the trade was for /// - [JsonProperty("s")] + [JsonPropertyName("s")] public string Symbol { get; set; } = string.Empty; /// /// The id of this trade /// - [JsonProperty("t")] + [JsonPropertyName("t")] public long Id { get; set; } /// /// The price of the trades /// - [JsonProperty("p")] + [JsonPropertyName("p")] public decimal Price { get; set; } /// /// The quantity of the trade /// - [JsonProperty("q")] + [JsonPropertyName("q")] public decimal Quantity { get; set; } /// /// The buyer order id /// - [JsonProperty("b")] + [JsonPropertyName("b")] public long BuyerOrderId { get; set; } /// /// The sell order id /// - [JsonProperty("a")] + [JsonPropertyName("a")] public long SellerOrderId { get; set; } /// /// The time of the trade /// - [JsonProperty("T"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("T"), JsonConverter(typeof(DateTimeConverter))] public DateTime TradeTime { get; set; } /// /// Whether the buyer was the maker /// - [JsonProperty("m")] + [JsonPropertyName("m")] public bool BuyerIsMaker { get; set; } /// /// Unused /// - [JsonProperty("M")] + [JsonPropertyName("M")] public bool IsBestMatch { get; set; } /// /// Update type /// - [JsonProperty("X")] + [JsonPropertyName("X")] public string? Type { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceBethRateHistory.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceBethRateHistory.cs index cf98a1dfb..7940692a5 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceBethRateHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceBethRateHistory.cs @@ -8,18 +8,18 @@ public record BinanceBethRateHistory /// /// Exchange rate /// - [JsonProperty("exchangeRate")] + [JsonPropertyName("exchangeRate")] public decimal ExchangeRate { get; set; } /// /// Anual percentage rate /// - [JsonProperty("annualPercentageRate")] + [JsonPropertyName("annualPercentageRate")] public decimal AnnualPercentageRate { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceBethWrapHistory.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceBethWrapHistory.cs index 7cac80a93..478763c3b 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceBethWrapHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceBethWrapHistory.cs @@ -8,39 +8,39 @@ public record BinanceBethWrapHistory /// /// Exchange rate /// - [JsonProperty("exchangeRate")] + [JsonPropertyName("exchangeRate")] public decimal ExchangeRate { get; set; } /// /// Output quantity /// - [JsonProperty("toAmount")] + [JsonPropertyName("toAmount")] public decimal ToQuantity { get; set; } /// /// Input quantity /// - [JsonProperty("fromAmount")] + [JsonPropertyName("fromAmount")] public decimal FromQuantity { get; set; } /// /// Timestamp /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } /// /// From asset /// - [JsonProperty("fromAsset")] + [JsonPropertyName("fromAsset")] public string FromAsset { get; set; } = string.Empty; /// /// To asset /// - [JsonProperty("toAsset")] + [JsonPropertyName("toAsset")] public string ToAsset { get; set; } = string.Empty; /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRedemptionHistory.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRedemptionHistory.cs index 9a3d2526d..3b750cc48 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRedemptionHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRedemptionHistory.cs @@ -8,28 +8,28 @@ public record BinanceEthRedemptionHistory /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Amount /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time")] + [JsonPropertyName("time")] [JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Arrival timestamp /// - [JsonProperty("arrivalTime")] + [JsonPropertyName("arrivalTime")] [JsonConverter(typeof(DateTimeConverter))] public DateTime ArrivalTime { get; set; } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRewardsHistory.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRewardsHistory.cs index 238ff8e09..08abde540 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRewardsHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthRewardsHistory.cs @@ -8,33 +8,33 @@ public record BinanceEthRewardsHistory /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Amount /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time")] + [JsonPropertyName("time")] [JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// BETH holding balance /// - [JsonProperty("holding")] + [JsonPropertyName("holding")] public decimal Holding { get; set; } /// /// Annual percentage rate /// - [JsonProperty("annualPercentageRate")] + [JsonPropertyName("annualPercentageRate")] public decimal AnnualPercentageRate { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingAccount.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingAccount.cs index 6cd08eff2..57f6d4744 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingAccount.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingAccount.cs @@ -8,12 +8,12 @@ public record BinanceEthStakingAccount /// /// Total profit in Beth /// - [JsonProperty("cumulativeProfitInBETH")] + [JsonPropertyName("cumulativeProfitInBETH")] public decimal TotalProfitInBeth { get; set; } /// /// Last day profit in Beth /// - [JsonProperty("lastDayProfitInBETH")] + [JsonPropertyName("lastDayProfitInBETH")] public decimal LastDayProfitInBeth { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingHistory.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingHistory.cs index 227099eaa..38ce6ecc0 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingHistory.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingHistory.cs @@ -8,22 +8,22 @@ public record BinanceEthStakingHistory /// /// Asset /// - [JsonProperty("asset")] + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Amount /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// Status /// - [JsonProperty("status")] + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Timestamp /// - [JsonProperty("time")] + [JsonPropertyName("time")] [JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingQuota.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingQuota.cs index 8f41bfa3f..e95b76735 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingQuota.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceEthStakingQuota.cs @@ -8,12 +8,12 @@ public record BinanceEthStakingQuota /// /// Staking quota left /// - [JsonProperty("leftStakingPersonalQuota")] + [JsonPropertyName("leftStakingPersonalQuota")] public decimal LeftStakingPersonalQuota { get; set; } /// /// Redemption quota left /// - [JsonProperty("leftRedemptionPersonalQuota")] + [JsonPropertyName("leftRedemptionPersonalQuota")] public decimal LeftRedemptionPersonalQuota { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingHistory.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingHistory.cs deleted file mode 100644 index 2326f3431..000000000 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingHistory.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Staking -{ - /// - /// Historical staking info - /// - public record BinanceStakingHistory - { - /// - /// Position id - /// - public string? PositionId { get; set; } - /// - /// Timestamp - /// - [JsonProperty("time")] - [JsonConverter(typeof(DateTimeConverter))] - public DateTime Timestamp { get; set; } - /// - /// Asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Project - /// - public string Project { get; set; } = string.Empty; - /// - /// Quantity - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// Lock period - /// - public int? LockPeriod { get; set; } - /// - /// Redemption date - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime DeliverDate { get; set; } - /// - /// Type - /// - public string? Type { get; set; } - /// - /// Status - /// - public string Status { get; set; } = string.Empty; - } -} diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPersonalQuota.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPersonalQuota.cs deleted file mode 100644 index 5849c5eae..000000000 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPersonalQuota.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Staking -{ - /// - /// Quota left - /// - public record BinanceStakingPersonalQuota - { - /// - /// Quota left - /// - [JsonProperty("leftPersonalQuota")] - public decimal PersonalQuotaLeft { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPosition.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPosition.cs deleted file mode 100644 index ed4dfd560..000000000 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingPosition.cs +++ /dev/null @@ -1,123 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Staking -{ - /// - /// Staking position info - /// - public record BinanceStakingPosition - { - /// - /// Position id - /// - public string? PositionId { get; set; } - /// - /// Project id - /// - public string ProductId { get; set; } = string.Empty; - /// - /// Locked asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Locked quantity - /// - [JsonProperty("amount")] - public decimal Quantity { get; set; } - /// - /// Purchase time - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime? PurchaseTime { get; set; } - /// - /// Lock period in days - /// - public int? Duration { get; set; } - /// - /// Accrue days - /// - public int? AccrualDays { get; set; } - /// - /// Reward asset - /// - public string RewardAsset { get; set; } = string.Empty; - /// - /// Apy - /// - public decimal Apy { get; set; } - /// - /// Earned quantity - /// - [JsonProperty("rewardAmt")] - public decimal RewardQuantity { get; set; } - /// - /// Rewards asset of extra staking type - /// - public string? ExtraRewardAsset { get; set; } - /// - /// Extra rewards Apy - /// - public decimal? ExtraRewardApy { get; set; } - /// - /// Rewards of extra staking type, distribute when order expires - /// - [JsonProperty("estExtraRewardAmt")] - public decimal? EstimatedExtraRewardQuantity { get; set; } - /// - /// Next estimated interest payment - /// - public decimal NextInterestPay { get; set; } - /// - /// Next interest payment date - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime NextInterestPayDate { get; set; } - /// - /// Interest cycle - /// - public decimal PayInterestPeriod { get; set; } - /// - /// Early redemption amount - /// - [JsonProperty("redeemAmountEarly")] - public decimal? RedeemQuantityEarly { get; set; } - /// - /// Interest accrual end date - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime? InterestEndDate { get; set; } - /// - /// Redemption arrival time - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime DeliverDate { get; set; } - /// - /// Redemption interval - /// - public decimal? RedeemPeriod { get; set; } - /// - /// Quantity under redemption - /// - [JsonProperty("redeemingAmt")] - public decimal RedeemQuantity { get; set; } - /// - /// Arrival time of partial redemption amount of order - /// - [JsonConverter(typeof(DateTimeConverter))] - public DateTime? PartialQuantityDeliverDate { get; set; } - /// - /// When it is true, early redemption can be operated - /// - public bool CanRedeemEarly { get; set; } - /// - /// When it is true, auto staking can be operated - /// - public bool Renewable { get; set; } - /// - /// Order type - /// - public string? Type { get; set; } = string.Empty; - /// - /// Status - /// - public string? Status { get; set; } = string.Empty; - } -} diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingProduct.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingProduct.cs deleted file mode 100644 index 8517d1717..000000000 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingProduct.cs +++ /dev/null @@ -1,65 +0,0 @@ -namespace Binance.Net.Objects.Models.Spot.Staking -{ - /// - /// Staking product info - /// - public record BinanceStakingProduct - { - /// - /// Project id - /// - public string ProjectId { get; set; } = string.Empty; - /// - /// Product details - /// - [JsonProperty("detail")] - public BinanceStakingProductDetails Details { get; set; } = null!; - /// - /// Product quota - /// - public BinanceStakingQuota Quota { get; set; } = null!; - } - - /// - /// Staking product details - /// - public record BinanceStakingProductDetails - { - /// - /// Lock up asset - /// - public string Asset { get; set; } = string.Empty; - /// - /// Reward asset - /// - public string RewardAsset { get; set; } = string.Empty; - /// - /// Duration in days - /// - public int Duration { get; set; } - /// - /// Renewable - /// - public bool Renewable { get; set; } - /// - /// Apy - /// - public decimal Apy { get; set; } - } - - /// - /// Staking product quota - /// - public record BinanceStakingQuota - { - /// - /// Total Personal quota - /// - [JsonProperty("totalPersonalQuota")] - public decimal Quota { get; set; } - /// - /// Minimum amount per order - /// - public decimal Minimum { get; set; } - } -} diff --git a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingResult.cs b/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingResult.cs index 391eba61f..6a760def5 100644 --- a/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingResult.cs +++ b/Binance.Net/Objects/Models/Spot/Staking/BinanceStakingResult.cs @@ -8,17 +8,7 @@ public record BinanceStakingResult /// /// Successful /// + [JsonPropertyName("success")] public bool Success { get; set; } } - - /// - /// Staking result - /// - public record BinanceStakingPositionResult: BinanceStakingResult - { - /// - /// Id of the position - /// - public string? PositionId { get; set; } - } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccount.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccount.cs index 02aa57b13..9faf2d345 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccount.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccount.cs @@ -2,6 +2,7 @@ { internal record BinanceSubAccountWrapper { + [JsonPropertyName("subAccounts")] public IEnumerable? SubAccounts { get; set; } } @@ -13,15 +14,18 @@ public record BinanceSubAccount /// /// The email associated with the sub account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Is account frozen /// + [JsonPropertyName("isFreeze")] public bool IsFreeze { get; set; } = false; /// /// The time the sub account was created /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("createTime")] public DateTime CreateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAsset.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAsset.cs index ac7647979..11ecd8e10 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAsset.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAsset.cs @@ -2,9 +2,11 @@ { internal record BinanceSubAccountAsset { + [JsonPropertyName("success")] public bool Success { get; set; } = true; - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string Message { get; set; } = string.Empty; + [JsonPropertyName("balances")] public IEnumerable Balances { get; set; } = Array.Empty(); } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAssetTransferHistory.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAssetTransferHistory.cs index 002004f92..21e964203 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAssetTransferHistory.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountAssetTransferHistory.cs @@ -4,16 +4,16 @@ namespace Binance.Net.Objects.Models.Spot.SubAccountData { internal record BinanceSubAccountAssetTransferHistoryList { - [JsonProperty("success")] + [JsonPropertyName("success")] public bool Success { get; set; } - [JsonProperty("futuresType")] + [JsonPropertyName("futuresType")] [JsonConverter(typeof(EnumConverter))] public FuturesAccountType AccountType { get; set; } /// /// Transfers /// - [JsonProperty("transfers")] + [JsonPropertyName("transfers")] public IEnumerable Transfers { get; set; } = new List(); @@ -27,35 +27,38 @@ public record BinanceSubAccountAssetTransferHistory /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// From email /// - public string From { get; set; } = ""; + [JsonPropertyName("from")] + public string From { get; set; } = string.Empty; /// /// To email /// - public string To { get; set; } = ""; + [JsonPropertyName("to")] + public string To { get; set; } = string.Empty; /// /// Asset /// - public string Asset { get; set; } = ""; + [JsonPropertyName("asset")] + public string Asset { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// The time transaction was created /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("time")] + [JsonPropertyName("time")] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountBlvt.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountBlvt.cs index 9eae8e7f6..bb1671b26 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountBlvt.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountBlvt.cs @@ -8,10 +8,12 @@ public record BinanceSubAccountBlvt /// /// The email associated with the sub account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Blvt enabled /// + [JsonPropertyName("enableBlvt")] public bool EnableBlvt { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDeposit.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDeposit.cs index 14ef39b61..bb8ab35e3 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDeposit.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDeposit.cs @@ -12,46 +12,52 @@ public record BinanceSubAccountDeposit /// Time the deposit was added to Binance /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("insertTime")] public DateTime InsertTime { get; set; } /// /// The quantity deposited /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// The asset deposited /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Network /// + [JsonPropertyName("network")] public string Network { get; set; } = string.Empty; /// /// The address of the deposit /// + [JsonPropertyName("address")] public string Address { get; set; } = string.Empty; /// /// The address tag /// + [JsonPropertyName("addressTag")] public string AddressTag { get; set; } = string.Empty; /// /// The transaction id /// - [JsonProperty("txId")] + [JsonPropertyName("txId")] public string TransactionId { get; set; } = string.Empty; /// /// Confirmation status /// + [JsonPropertyName("confirmTimes")] public string ConfirmTimes { get; set; } = string.Empty; /// /// Transfer type /// + [JsonPropertyName("transferType")] public int TransferType { get; set; } /// /// The status of the deposit /// - [JsonConverter(typeof(DepositStatusConverter))] + [JsonPropertyName("status")] public DepositStatus Status { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDepositAddress.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDepositAddress.cs index ce7974334..9685c936a 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDepositAddress.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountDepositAddress.cs @@ -8,19 +8,22 @@ public record BinanceSubAccountDepositAddress /// /// The deposit address /// + [JsonPropertyName("address")] public string Address { get; set; } = string.Empty; /// /// Asset type /// - [JsonProperty("coin")] + [JsonPropertyName("coin")] public string Asset { get; set; } = string.Empty; /// /// Tag for the deposit address /// + [JsonPropertyName("tag")] public string Tag { get; set; } = string.Empty; /// /// Url /// + [JsonPropertyName("url")] public string Url { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountEmail.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountEmail.cs index ffbe3eefd..4bb7b3cd2 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountEmail.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountEmail.cs @@ -8,6 +8,7 @@ public record BinanceSubAccountEmail /// /// The email associated with the sub account /// - public string Email { get; set; } = string.Empty; + [JsonPropertyName("email")] + public string Email { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetails.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetails.cs index 02150d9c8..f8c771211 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetails.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetails.cs @@ -8,68 +8,83 @@ public record BinanceSubAccountFuturesDetails /// /// Email of the sub account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// List of asset details /// + [JsonPropertyName("assets")] public IEnumerable Assets { get; set; } = Array.Empty(); /// /// Can deposit /// + [JsonPropertyName("canDeposit")] public bool CanDeposit { get; set; } /// /// Can trade /// + [JsonPropertyName("canTrade")] public bool CanTrade { get; set; } /// /// Can withdraw /// + [JsonPropertyName("canWithdraw")] public bool CanWithdraw { get; set; } /// /// Fee tier /// + [JsonPropertyName("feeTier")] public int FeeTier { get; set; } /// /// Max quantity which can be withdrawn /// - [JsonProperty("maxWithdrawAmount")] + [JsonPropertyName("maxWithdrawAmount")] public decimal MaxWithdrawQuantity{ get; set; } /// /// Total initial margin /// + [JsonPropertyName("totalInitialMargin")] public decimal TotalInitialMargin { get; set; } /// /// Total maintenance margin /// + [JsonPropertyName("totalMaintenanceMargin")] public decimal TotalMaintenanceMargin { get; set; } /// /// Total margin balance /// + [JsonPropertyName("totalMarginBalance")] public decimal TotalMarginBalance { get; set; } /// /// Total open order initial margin /// + [JsonPropertyName("totalOpenOrderInitialMargin")] public decimal TotalOpenOrderInitialMargin { get; set; } /// /// Total position initial margin /// + [JsonPropertyName("totalPositionInitialMargin")] public decimal TotalPositionInitialMargin { get; set; } /// /// Total unrealized profit /// + [JsonPropertyName("totalUnrealizedProfit")] public decimal TotalUnrealizedProfit { get; set; } /// /// Total wallet balance /// + [JsonPropertyName("totalWalletBalance")] public decimal TotalWalletBalance { get; set; } /// /// Time of the data /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } @@ -81,39 +96,47 @@ public record BinanceSubAccountFuturesAsset /// /// The asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Initial margin /// + [JsonPropertyName("initialMargin")] public decimal InitialMargin { get; set; } /// /// Maintenance margin /// + [JsonPropertyName("maintenanceMargin")] public decimal MaintenanceMargin { get; set; } /// /// Margin balance /// + [JsonPropertyName("marginBalance")] public decimal MarginBalance { get; set; } /// /// Max quantity which can be withdrawn /// - [JsonProperty("maxWithdrawAmount")] + [JsonPropertyName("maxWithdrawAmount")] public decimal MaxWithdrawQuantity { get; set; } /// /// Open order initial margin /// + [JsonPropertyName("openOrderInitialMargin")] public decimal OpenOrderInitialMargin { get; set; } /// /// Position initial margin /// + [JsonPropertyName("positionInitialMargin")] public decimal PositionInitialMargin { get; set; } /// /// Unrealized profit /// + [JsonPropertyName("unrealizedProfit")] public decimal UnrealizedProfit { get; set; } /// /// Wallet balance /// + [JsonPropertyName("walletBalance")] public decimal WalletBalance { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetailsV2.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetailsV2.cs index 3936d8512..30610a005 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetailsV2.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesDetailsV2.cs @@ -8,13 +8,13 @@ public record BinanceSubAccountFuturesDetailsV2 /// /// Futures account response (USDT margined) /// - [JsonProperty("futureAccountResp")] + [JsonPropertyName("futureAccountResp")] public BinanceSubAccountFuturesDetailV2Usdt UsdtMarginedFutures { get; set; } = default!; /// /// Delivery account response (COIN margined) /// - [JsonProperty("deliveryAccountResp")] + [JsonPropertyName("deliveryAccountResp")] public BinanceSubAccountFuturesDetailV2 CoinMarginedFutures { get; set; } = default!; } @@ -26,31 +26,38 @@ public record BinanceSubAccountFuturesDetailV2 /// /// Email of the sub account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// List of asset details /// + [JsonPropertyName("assets")] public IEnumerable Assets { get; set; } = Array.Empty(); /// /// Can deposit /// + [JsonPropertyName("canDeposit")] public bool CanDeposit { get; set; } /// /// Can trade /// + [JsonPropertyName("canTrade")] public bool CanTrade { get; set; } /// /// Can withdraw /// + [JsonPropertyName("canWithdraw")] public bool CanWithdraw { get; set; } /// /// Fee tier /// + [JsonPropertyName("feeTier")] public int FeeTier { get; set; } /// /// Time of the data /// [JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("updateTime")] public DateTime UpdateTime { get; set; } } @@ -62,35 +69,42 @@ public record BinanceSubAccountFuturesDetailV2Usdt : BinanceSubAccountFuturesDet /// /// Max quantity which can be withdrawn /// - [JsonProperty("maxWithdrawAmount")] + [JsonPropertyName("maxWithdrawAmount")] public decimal MaxWithdrawQuantity { get; set; } /// /// Total initial margin /// + [JsonPropertyName("totalInitialMargin")] public decimal TotalInitialMargin { get; set; } /// /// Total maintenance margin /// + [JsonPropertyName("totalMaintenanceMargin")] public decimal TotalMaintenanceMargin { get; set; } /// /// Total margin balance /// + [JsonPropertyName("totalMarginBalance")] public decimal TotalMarginBalance { get; set; } /// /// Total open order initial margin /// + [JsonPropertyName("totalOpenOrderInitialMargin")] public decimal TotalOpenOrderInitialMargin { get; set; } /// /// Total position initial margin /// + [JsonPropertyName("totalPositionInitialMargin")] public decimal TotalPositionInitialMargin { get; set; } /// /// Total unrealized profit /// + [JsonPropertyName("totalUnrealizedProfit")] public decimal TotalUnrealizedProfit { get; set; } /// /// Total wallet balance /// + [JsonPropertyName("totalWalletBalance")] public decimal TotalWalletBalance { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesEnabled.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesEnabled.cs index 34065d50c..1d6ae7517 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesEnabled.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesEnabled.cs @@ -8,10 +8,12 @@ public record BinanceSubAccountFuturesEnabled /// /// Email of the account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Whether futures trading is enabled /// + [JsonPropertyName("isFuturesEnabled")] public bool IsFuturesEnabled { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRisk.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRisk.cs index f52bd3e60..c06526e43 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRisk.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRisk.cs @@ -8,35 +8,42 @@ public record BinanceSubAccountFuturesPositionRisk /// /// The entry price /// + [JsonPropertyName("entryPrice")] public decimal EntryPrice { get; set; } /// /// Leverage /// + [JsonPropertyName("leverage")] public decimal Leverage { get; set; } /// /// Max notional /// + [JsonPropertyName("maxNotional")] public decimal MaxNotional { get; set; } /// /// Liquidation price /// + [JsonPropertyName("liquidationPrice")] public decimal LiquidationPrice { get; set; } /// /// Mark price /// + [JsonPropertyName("markPrice")] public decimal MarkPrice { get; set; } /// /// Position quantity /// - [JsonProperty("positionAmount")] + [JsonPropertyName("positionAmount")] public decimal PositionQuantity { get; set; } /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Unrealized profit /// + [JsonPropertyName("unrealizedProfit")] public decimal UnrealizedProfit { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRiskV2.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRiskV2.cs index 995b87b69..61a37f9e6 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRiskV2.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountFuturesPositionRiskV2.cs @@ -11,13 +11,13 @@ public record BinanceSubAccountFuturesPositionRiskV2 /// /// Futures account response (USDT margined) /// - [JsonProperty("futurePositionRiskVos")] + [JsonPropertyName("futurePositionRiskVos")] public IEnumerable UsdtMarginedFutures { get; set; } = Array.Empty(); /// /// Delivery account response (COIN margined) /// - [JsonProperty("deliveryPositionRiskVos")] + [JsonPropertyName("deliveryPositionRiskVos")] public IEnumerable CoinMarginedFutures { get; set; } = Array.Empty(); } @@ -29,58 +29,67 @@ public record BinanceSubAccountFuturesPositionRiskCoin /// /// The entry price /// + [JsonPropertyName("entryPrice")] public decimal EntryPrice { get; set; } /// /// Mark price /// + [JsonPropertyName("markPrice")] public decimal MarkPrice { get; set; } /// /// Leverage /// + [JsonPropertyName("leverage")] public decimal Leverage { get; set; } /// /// Isolated /// + [JsonPropertyName("isolated")] public bool Isolated { get; set; } /// /// Isolated wallet /// + [JsonPropertyName("isolatedWallet")] public decimal IsolatedWallet { get; set; } /// /// Isolated margin /// + [JsonPropertyName("isolatedMargin")] public decimal IsolatedMargin { get; set; } /// /// Is auto add margin /// + [JsonPropertyName("isAutoAddMargin")] public bool IsAutoAddMargin { get; set; } /// /// Position side /// - [JsonConverter(typeof(PositionSideConverter))] + [JsonPropertyName("positionSide")] public PositionSide PositionSide { get; set; } /// /// Position amount /// - [JsonProperty("positionAmount")] + [JsonPropertyName("positionAmount")] public decimal PositionQuantity { get; set; } /// /// Symbol /// + [JsonPropertyName("symbol")] public string Symbol { get; set; } = string.Empty; /// /// Unrealized profit /// + [JsonPropertyName("unrealizedProfit")] public decimal UnrealizedProfit { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginDetails.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginDetails.cs index 5c3d7440e..e4c5d8947 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginDetails.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginDetails.cs @@ -10,32 +10,37 @@ public record BinanceSubAccountMarginDetails /// /// Email of the account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Margin level /// + [JsonPropertyName("marginLevel")] public decimal MarginLevel { get; set; } /// /// Total asset in btc /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } /// /// Total liability /// + [JsonPropertyName("totalLiabilityOfBtc")] public decimal TotalLiabilityOfBtc { get; set; } /// /// Total net asset /// + [JsonPropertyName("totalNetAssetOfBtc")] public decimal TotalNetAssetOfBtc { get; set; } /// /// Trade details /// - [JsonProperty("marginTradeCoeffVo")] + [JsonPropertyName("marginTradeCoeffVo")] public BinanceMarginTradeCoeff? MarginTradeCoeff { get; set; } /// /// Asset list /// - [JsonProperty("marginUserAssetVoList")] + [JsonPropertyName("marginUserAssetVoList")] public IEnumerable MarginUserAssets { get; set; } = Array.Empty(); } @@ -47,14 +52,17 @@ public record BinanceMarginTradeCoeff /// /// Liquidation margin ratio /// + [JsonPropertyName("forceLiquidationBar")] public decimal ForceLiquidationBar { get; set; } /// /// Margin record margin ratio /// + [JsonPropertyName("marginCallBar")] public decimal MarginCallBar { get; set; } /// /// Initial margin ratio /// + [JsonPropertyName("normalBar")] public decimal NormalBar { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginEnabled.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginEnabled.cs index 3a9d8a202..6a0445047 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginEnabled.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountMarginEnabled.cs @@ -8,10 +8,12 @@ public record BinanceSubAccountMarginEnabled /// /// Email of the account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Whether Margin trading is enabled /// + [JsonPropertyName("isMarginEnabled")] public bool IsMarginEnabled { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountSpotAssetsSummary.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountSpotAssetsSummary.cs index 66aa83f2d..4c4b306e1 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountSpotAssetsSummary.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountSpotAssetsSummary.cs @@ -8,15 +8,17 @@ public record BinanceSubAccountSpotAssetsSummary /// /// Total records /// + [JsonPropertyName("totalCount")] public int TotalCount { get; set; } /// /// Master account total asset value /// + [JsonPropertyName("masterAccountTotalAsset")] public decimal MasterAccountTotalAsset { get; set; } /// /// Sub account values /// - [JsonProperty("spotSubUserAssetBtcVoList")] + [JsonPropertyName("spotSubUserAssetBtcVoList")] public IEnumerable SubAccountsBtcValues { get; set; } = Array.Empty(); } @@ -28,10 +30,12 @@ public record BinanceSubAccountBtcValue /// /// Sub account email /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Sub account total asset /// + [JsonPropertyName("totalAsset")] public decimal TotalAsset { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountStatus.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountStatus.cs index 5123d1137..98025bf19 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountStatus.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountStatus.cs @@ -8,43 +8,43 @@ public record BinanceSubAccountStatus /// /// User email /// - [JsonProperty("email")] + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Sub account user enabled /// - [JsonProperty("isSubUserEnabled")] + [JsonPropertyName("isSubUserEnabled")] public bool IsAccountEnabled { get; set; } /// /// Sub account user active /// - [JsonProperty("isUserActive")] + [JsonPropertyName("isUserActive")] public bool IsActive { get; set; } /// /// The time the sub account was created /// - [JsonProperty("insertTime"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("insertTime"), JsonConverter(typeof(DateTimeConverter))] public DateTime CreateTime { get; set; } /// /// Is Margin enabled /// - [JsonProperty("isMarginEnabled")] + [JsonPropertyName("isMarginEnabled")] public bool IsMarginEnabled { get; set; } /// /// Is Futures enabled /// - [JsonProperty("isFutureEnabled")] + [JsonPropertyName("isFutureEnabled")] public bool IsFutureEnabled { get; set; } /// /// User mobile number /// - [JsonProperty("mobile")] + [JsonPropertyName("mobile")] public string? MobileNumber { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransaction.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransaction.cs index 495947ef4..cdee709d2 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransaction.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransaction.cs @@ -8,7 +8,7 @@ public record BinanceSubAccountTransaction /// /// The transaction id /// - [JsonProperty("txnId")] + [JsonPropertyName("txnId")] public string TransactionId { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransfer.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransfer.cs index 272e8b41d..e62c37920 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransfer.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransfer.cs @@ -2,9 +2,11 @@ { internal record BinanceSubAccountTransferWrapper { - [JsonProperty("msg")] + [JsonPropertyName("msg")] public string? Message { get; set; } + [JsonPropertyName("success")] public bool Success { get; set; } + [JsonPropertyName("transfers")] public IEnumerable? Transfers { get; set; } } @@ -16,33 +18,37 @@ public record BinanceSubAccountTransfer /// /// From which email the transfer originated /// + [JsonPropertyName("from")] public string From { get; set; } = string.Empty; /// /// To which email the transfer was to /// + [JsonPropertyName("to")] public string To { get; set; } = string.Empty; /// /// The asset of the transfer /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// The quantity of the transfer /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// The timestamp of the transfer /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } /// /// Status of the transaction /// - public string Status { get; set; } = ""; + [JsonPropertyName("status")] + public string Status { get; set; } = string.Empty; /// /// Transaction Id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferResult.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferResult.cs index d3a9111dc..7b8311a1b 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferResult.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferResult.cs @@ -8,11 +8,12 @@ public record BinanceSubAccountTransferResult /// /// Whether the transfer was successful /// + [JsonPropertyName("success")] public bool Success { get; set; } /// /// The transaction id of the transfer /// - [JsonProperty("txnId")] + [JsonPropertyName("txnId")] public string? TransactionId { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferSubAccount.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferSubAccount.cs index 3da86e17f..77f6bfac2 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferSubAccount.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountTransferSubAccount.cs @@ -11,47 +11,53 @@ public record BinanceSubAccountTransferSubAccount /// /// Counter party of the transfer /// + [JsonPropertyName("counterParty")] public string CounterParty { get; set; } = string.Empty; /// /// Email of the account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// From account type /// + [JsonPropertyName("fromAccountType")] public string FromAccountType { get; set; } = string.Empty; /// /// To account type /// + [JsonPropertyName("toAccountType")] public string ToAccountType { get; set; } = string.Empty; /// /// Status /// + [JsonPropertyName("status")] public string Status { get; set; } = string.Empty; /// /// Transfer type /// - [JsonConverter(typeof(SubAccountTransferSubAccountTypeConverter))] + [JsonPropertyName("type")] public SubAccountTransferSubAccountType Type { get; set; } /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public string TransactionId { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("qty")] + [JsonPropertyName("qty")] public decimal Quantity { get; set; } /// /// Timestamp of the transfer /// - [JsonProperty("time"), JsonConverter(typeof(DateTimeConverter))] + [JsonPropertyName("time"), JsonConverter(typeof(DateTimeConverter))] public DateTime Timestamp { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountUniversalTransferTransaction.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountUniversalTransferTransaction.cs index 8a1cf693d..c421e3191 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountUniversalTransferTransaction.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountUniversalTransferTransaction.cs @@ -8,7 +8,7 @@ internal record BinanceSubAccountUniversalTransfersList /// /// Transactions /// - [JsonProperty("result")] + [JsonPropertyName("result")] public IEnumerable Transactions { get; set; } = new List(); @@ -22,52 +22,56 @@ public record BinanceSubAccountUniversalTransferTransaction /// /// Transaction id /// - [JsonProperty("tranId")] + [JsonPropertyName("tranId")] public long TransactionId { get; set; } /// /// From email /// - public string FromEmail { get; set; } = ""; + [JsonPropertyName("fromEmail")] + public string FromEmail { get; set; } = string.Empty; /// /// To email /// - public string ToEmail { get; set; } = ""; + [JsonPropertyName("toEmail")] + public string ToEmail { get; set; } = string.Empty; /// /// From account type /// - [JsonConverter(typeof(TransferAccountTypeConverter))] + [JsonPropertyName("fromAccountType")] public TransferAccountType FromAccountType { get; set; } /// /// To account type /// - [JsonConverter(typeof(TransferAccountTypeConverter))] + [JsonPropertyName("toAccountType")] public TransferAccountType ToAccountType { get; set; } /// /// Status /// - public string Status { get; set; } = ""; + [JsonPropertyName("status")] + public string Status { get; set; } = string.Empty; /// /// Asset /// - public string Asset { get; set; } = ""; + [JsonPropertyName("asset")] + public string Asset { get; set; } = string.Empty; /// /// Quantity /// - [JsonProperty("amount")] + [JsonPropertyName("amount")] public decimal Quantity { get; set; } /// /// The time the universal transaction was created /// [JsonConverter(typeof(DateTimeConverter))] - [JsonProperty("createTimeStamp")] + [JsonPropertyName("createTimeStamp")] public DateTime CreateTime { get; set; } } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsFuturesSummary.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsFuturesSummary.cs index ac3eec59d..1e2d261e0 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsFuturesSummary.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsFuturesSummary.cs @@ -8,40 +8,48 @@ public record BinanceSubAccountsFuturesSummary /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; /// /// Total initial margin /// + [JsonPropertyName("totalInitialMargin")] public decimal TotalInitialMargin { get; set; } /// /// Total maintenance margin /// + [JsonPropertyName("totalMaintenanceMargin")] public decimal TotalMaintenanceMargin { get; set; } /// /// Total margin balance /// + [JsonPropertyName("totalMarginBalance")] public decimal TotalMarginBalance { get; set; } /// /// Total open order initial margin /// + [JsonPropertyName("totalOpenOrderInitialMargin")] public decimal TotalOpenOrderInitialMargin { get; set; } /// /// Total position initial margin /// + [JsonPropertyName("totalPositionInitialMargin")] public decimal TotalPositionInitialMargin { get; set; } /// /// Total unrealized profit /// + [JsonPropertyName("totalUnrealizedProfit")] public decimal TotalUnrealizedProfit { get; set; } /// /// Total wallet balance /// + [JsonPropertyName("totalWalletBalance")] public decimal TotalWalletBalance { get; set; } /// /// Sub accounts info /// - [JsonProperty("subAccountList")] + [JsonPropertyName("subAccountList")] public IEnumerable SubAccounts { get; set; } = Array.Empty(); } @@ -53,38 +61,47 @@ public record BinanceSubAccountFuturesInfo /// /// Email of the sub account /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Total initial margin /// + [JsonPropertyName("totalInitialMargin")] public decimal TotalInitialMargin { get; set; } /// /// Total maintenance margin /// + [JsonPropertyName("totalMaintenanceMargin")] public decimal TotalMaintenanceMargin { get; set; } /// /// Total margin balance /// + [JsonPropertyName("totalMarginBalance")] public decimal TotalMarginBalance { get; set; } /// /// Total open order initial margin /// + [JsonPropertyName("totalOpenOrderInitialMargin")] public decimal TotalOpenOrderInitialMargin { get; set; } /// /// Total position initial margin /// + [JsonPropertyName("totalPositionInitialMargin")] public decimal TotalPositionInitialMargin { get; set; } /// /// Total unrealized profit /// + [JsonPropertyName("totalUnrealizedProfit")] public decimal TotalUnrealizedProfit { get; set; } /// /// Total wallet balance /// + [JsonPropertyName("totalWalletBalance")] public decimal TotalWalletBalance { get; set; } /// /// Asset /// + [JsonPropertyName("asset")] public string Asset { get; set; } = string.Empty; } } diff --git a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsMarginSummary.cs b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsMarginSummary.cs index d9875fd58..b78412cb4 100644 --- a/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsMarginSummary.cs +++ b/Binance.Net/Objects/Models/Spot/SubAccountData/BinanceSubAccountsMarginSummary.cs @@ -8,19 +8,22 @@ public record BinanceSubAccountsMarginSummary /// /// Total btc asset /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } /// /// Total liability /// + [JsonPropertyName("totalLiabilityOfBtc")] public decimal TotalLiabilityOfBtc { get; set; } /// /// Total net btc /// + [JsonPropertyName("totalNetAssetOfBtc")] public decimal TotalNetAssetOfBtc { get; set; } /// /// Sub account details /// - [JsonProperty("subAccountList")] + [JsonPropertyName("subAccountList")] public IEnumerable SubAccounts { get; set; } = Array.Empty(); } @@ -32,18 +35,22 @@ public record BinanceSubAccountMarginInfo /// /// Sub account email /// + [JsonPropertyName("email")] public string Email { get; set; } = string.Empty; /// /// Total btc asset /// + [JsonPropertyName("totalAssetOfBtc")] public decimal TotalAssetOfBtc { get; set; } /// /// Total liability /// + [JsonPropertyName("totalLiabilityOfBtc")] public decimal TotalLiabilityOfBtc { get; set; } /// /// Total net btc /// + [JsonPropertyName("totalNetAssetOfBtc")] public decimal TotalNetAssetOfBtc { get; set; } } } diff --git a/Binance.Net/Objects/Sockets/BinanceSocketQueryResponse.cs b/Binance.Net/Objects/Sockets/BinanceSocketQueryResponse.cs index 29bd53a7f..a1ab0fa4f 100644 --- a/Binance.Net/Objects/Sockets/BinanceSocketQueryResponse.cs +++ b/Binance.Net/Objects/Sockets/BinanceSocketQueryResponse.cs @@ -2,7 +2,7 @@ { internal class BinanceSocketQueryResponse { - [JsonProperty("id")] + [JsonPropertyName("id")] public int Id { get; set; } } } diff --git a/Binance.Net/Usings.cs b/Binance.Net/Usings.cs index 8e39acee6..5c307b8a2 100644 --- a/Binance.Net/Usings.cs +++ b/Binance.Net/Usings.cs @@ -1,16 +1,14 @@ global using CryptoExchange.Net; global using CryptoExchange.Net.Authentication; -global using CryptoExchange.Net.Converters.JsonNet; +global using CryptoExchange.Net.Converters.SystemTextJson; global using CryptoExchange.Net.Interfaces; global using CryptoExchange.Net.Objects; global using Microsoft.Extensions.Logging; -global using Newtonsoft.Json; -global using Newtonsoft.Json.Linq; -global using Newtonsoft.Json.Serialization; global using System; global using System.Collections.Generic; global using System.Globalization; global using System.Linq; global using System.Net.Http; global using System.Threading; -global using System.Threading.Tasks; \ No newline at end of file +global using System.Threading.Tasks; +global using System.Text.Json.Serialization; \ No newline at end of file